-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nose to pytest transition #183
Conversation
This touches a lot of code because pytest.raises is used in a context manager, so indentation has to be changed. Replacement happened with regex from @raises\((.*)\) to @pytest.mark.xfail(raises=$1) then from @pytest.mark.xfail\(raises=(.*)\)\ndef(.*) to def$2\n with pytest.raises($1): then manual correction of indentation.
OK, I just discovered some problems from replacing the |
OK, the remaining error in the CI ("E:452,20: Method 'value' has no 'index' member (no-member)") is not even in code I touched, so I am unsure how to fix this. Also, I'm not sure the warning is even correct, as the line in question is
so |
OK, squash one set of spurious warnings by upgrading, get another one. The inconsistent-return-statements warnings could be pylint-dev/pylint#1782, which is still open. |
Hello there!! This is fantastic, thank you for your hard work! I will take a look at everything this weekend, but a quick glance shows a pretty comprehensive body of work. Upgrading |
Pin astroid version, too, to avoid wrong errors on CI.
OK, I cleaned up the commit history and fixed the CI problems, mainly by pinning astroid, too. Ready for review. |
I have taken a look, and it seems good from a first pass. I'll check the code out (hopefully today) and give it a whirl just for my sanity. With pytest I'll probably want to migrate repetitive |
Yeah, I did not do anything to make the tests more "pytest-idiomatic", as that can and should come later. |
Move from nose to pytest. Fixes #58.
The commit messages have some explanations, basically this was more or less tedious copy/paste. A lot of code was touched because the transition to
pytest.raises
necessitates increasing indentation for a whole block. (You can inspect changes without considering whitespace by appending?w=1
to the URL)Pytest tests all pass, the same number as before with nose. Let's see what the CI says.