Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tidying up, and replace nose with pytest#1289

Merged
Yobmod merged 18 commits intomainfrom
pytest
Jul 13, 2021
Merged

Tidying up, and replace nose with pytest#1289
Yobmod merged 18 commits intomainfrom
pytest

Conversation

@Yobmod
Copy link
Contributor

@YobmodYobmod commentedJul 12, 2021
edited
Loading

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!

Byron reacted with hooray emoji
Combined pytest into usual workflow
Add pytest step to workflowAdd pip install setuptools and wheelInvoke mypy directly, no need for tox
Ignore flake8 E704 (Multiple statements on one line) too make overloads smallerAdd [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
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
@YobmodYobmod changed the titleTidying up, and prep for pytestTidying up, and replace nose with pytestJul 12, 2021
@YobmodYobmod merged commit63f5541 intomainJul 13, 2021
@YobmodYobmod deleted the pytest branchJuly 13, 2021 21:38
@Byron
Copy link
Member

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 therespective section in the docs and see if a command-line withouttox could be suggested there as well.

There also is aMakefile that could be loaded up with useful targets for typical local development, to help running tests and linters for example.

@ByronByron added this to thev3.1.19 - Bugfixes milestoneJul 23, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Nose unsupported, doesnt work with Python 3.10

2 participants

@Yobmod@Byron

[8]ページ先頭

©2009-2026 Movatter.jp