Convert backend tests to use pytest#7863
Conversation
fa4a961 to
78f7f2a
Compare
| finally: | ||
| shutil.rmtree(test_dir) | ||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
How do we run tests on only one module with pytest?
|
I don't know pytest well. How do you run tests on only one module with pytest? |
|
If it's installed from source, you can use the file itself: |
NelleV
left a comment
There was a problem hiding this comment.
LGTM.
For the record, I am quite concerned by how complex this transition to pytests is.
|
To give these individual PRs some substance, I have not done just a straight conversion, but also tried to take advantage of pytest's additional niceties. I can do a PR of just straight nose-removal if there's interest in that. |
|
I think this underlines that our test suite is very complex, which unfortunately means also complicated to maintain. I also don't find pytest very nice nor readable to use, but it might just be a question of getting used to it. |
|
@NelleV it is a very different approach, for sure. I tried for ~18 months to like pytest, and just couldn't get into it. Then about a year ago I forced myself to start from scratch with it on a new package and it clicked and made python magical again. |
|
I added one more change to fix the determinism tests from the backends which are not fully included in the |
4193c11 to
9e3b260
Compare
|
What in tarnation is taking the CI so long on this? I'll kick to the see if that helps. |
|
You might have missed it, but I rebased because of the conflicts. |
|
This looks good to me. |
|
Oh, sorry @QuLogic . The Github UI said the commits were from 6 days ago. I can't blame them for that. But it was confusing nonetheless. |
Net line count drop, seems good to me.
Also, fix one of the decorators to work properly with pytest.