-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
Tidying up, and replace nose with pytest #1289
Conversation
Combined pytest into usual workflow
Add pytest step to workflow Add pip install setuptools and wheel Invoke mypy directly, no need for tox
Add pytest plugins
Ignore flake8 E704 (Multiple statements on one line) too make overloads smaller Add [pytest] config section
Change distutils.build_py to its setuptools wrapper. Distutils one deprecated since py3.8, but setuptools one working py3.6-3.10
Remove nose
Replace nose with pytest
Move pytest before Documentation in workflow
Not sure it is picking up the tox.ini
Add 3.10.0-beta.3 to test matrix. (beta 4 out, but wouldn't install. Need to force cache emptying?)
update to actions/setup-python@v1
Fantastic work once again! I remember that now being able to use pytest was a hurdle for some contributors, I am glad that's removed now. Maybe you could also have a look at the respective section in the docs and see if a command-line without There also is a Makefile that could be loaded up with useful targets for typical local development, to help running tests and linters for example. |
Fix #1287
Some tidying up for config files.
All I wanted was a linter that could report on imports only needed for typing!
Anyway...
setup.py
Change distutils build_py to setuptools wrapper. Deprecated since py3.8, I thought it caused a problem with 3.10beta. Now works py3.6-3.10.
Tox.ini
Ignore E704 (mutiple expression per line) so can make @Overloads neater
Add [pytest] config section
requirements
Created requirements-dev.txt with pytest and plugins
Edit: Changed nose to pytest in test-requirements.txt
Pythonpackage.yaml
Add pip install wheel and setuptools, newer packages were having to fallback to EZ_setup without them.
Invoke mypy directly, no need for tox.
Add py3.10.0-Beta.3 to test matrix....
....which needed update to actions/setup-python@v2
Add pytest step - runs after Documentation and set to always pass, but shows errors in info
Edit: Swapped nose for pytest
Results
Pytest results: 378 passed, 42 skipped, 3 warnings
Nose results: 420 tests, 42 skipped (= 378)
So we might just be able to switch directly to Pytest to run the tests.
But test code still needs to be gone through to remove any nose dependancy for py3.10.
Edit: if there is any - all looks like unittest to me?
Edit2: So ive removed nose everywhere, and all same tests pass or fail or are skipped!