Skip to content
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

Fix tests for Python 4 #173

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Fix tests for Python 4 #173

merged 1 commit into from
Aug 27, 2019

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Aug 26, 2019

We don't yet know if 3.10 or 4.0 will follow Python 3.9, but whichever it is, it will probably happen in 2020 when Python 3.9 reaches beta.

There's some tests which check the Python major version is exactly 3. Instead, check it's at least 3.

Found using https://github.com/asottile/flake8-2020:

$ pip install -U flake8-2020
...
$ flake8 --select YTT
./tests/codec/ber/test_decoder.py:489:120: YTT201: `sys.version_info[0] == 3` referenced (python4), use `>=`
./tests/codec/ber/test_decoder.py:494:91: YTT201: `sys.version_info[0] == 3` referenced (python4), use `>=`
./tests/codec/ber/test_decoder.py:499:83: YTT201: `sys.version_info[0] == 3` referenced (python4), use `>=`
./tests/codec/ber/test_encoder.py:439:56: YTT201: `sys.version_info[0] == 3` referenced (python4), use `>=`

@etingof
Copy link
Owner

etingof commented Aug 27, 2019

Oh, dear... Time flies...

Thank you!

@etingof etingof merged commit 7214dca into etingof:master Aug 27, 2019
@hugovk hugovk deleted the fix-flake8-2020 branch August 27, 2019 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants