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

Support for python3.8 #269

Closed
lewoudar opened this issue Dec 31, 2019 · 9 comments
Closed

Support for python3.8 #269

lewoudar opened this issue Dec 31, 2019 · 9 comments

Comments

@lewoudar
Copy link
Contributor

lewoudar commented Dec 31, 2019

Hi everyone,
I forked the project to update noxfile and ci configuration for python3.8 but when I test on my laptop I was surprised that the session tests-3.7 failed, to be precise it is nox/sessions and nox/virtualenv tests that failed .

How to reproduce
I use a Windows 10 PC and I have installed dependencies using pip install -e .

Does anyone have an explanation?

@theacodes
Copy link
Collaborator

theacodes commented Dec 31, 2019 via email

@lewoudar
Copy link
Contributor Author

oo Sorry,
This is the output I have

(venv) D:\projets\python\third_party\nox>nox -s tests-3.7
nox > Running session tests-3.7
nox > Creating virtual environment (virtualenv) using python.exe in .nox\tests-3-7
nox > pip install -r requirements-test.txt
nox > pip install -e .[tox_to_nox]
nox > pytest --cov=nox --cov-config .coveragerc --cov-report= tests/
================================================================================== test session starts ==================================================================================
platform win32 -- Python 3.7.0, pytest-5.3.2, py-1.8.1, pluggy-0.13.1
rootdir: D:\projets\python\third_party\nox
plugins: cov-2.8.1
collected 240 items                                                                                                                                                                      

tests\test__option_set.py .....                                                                                                                                                    [  2%]
tests\test__parametrize.py .................                                                                                                                                       [  9%]
tests\test_command.py ....................                                                                                                                                         [ 17%]
tests\test_logger.py ...                                                                                                                                                           [ 18%]
tests\test_main.py .........................                                                                                                                                       [ 29%]
tests\test_manifest.py ....................                                                                                                                                        [ 37%]
tests\test_registry.py ..........                                                                                                                                                  [ 41%]
tests\test_sessions.py ...............................................................                                                                                             [ 67%]
tests\test_tasks.py ....................                                                                                                                                           [ 76%]
tests\test_tox_to_nox.py .......                                                                                                                                                   [ 79%]
tests\test_virtualenv.py ...ss..s.......s...............................                                                                                                           [ 98%]
tests\test_workflow.py ...                                                                                                                                                         [100%]



======================================================================= 236 passed, 4 skipped in 66.13s (0:01:06) =======================================================================
nox > Session tests-3.7 was successful.
nox > Running session cover
nox > Creating virtual environment (virtualenv) using python.exe in .nox\cover
nox > pip install coverage
nox > coverage report --fail-under=100 --show-missing
Name                  Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------
nox\__init__.py           5      0      0      0   100%
nox\__main__.py          17      0      4      0   100%
nox\_option_set.py       96      0     34      0   100%
nox\_options.py          50      0     20      0   100%
nox\_parametrize.py      83      2     38      0    98%   40, 161
nox\command.py           56      0     24      0   100%
nox\logger.py            25      0      2      0   100%
nox\manifest.py         117      0     62      0   100%
nox\popen.py             17      0      4      0   100%
nox\registry.py          18      0      6      0   100%
nox\sessions.py         205     10     64      0    96%   83, 93, 98, 104, 109, 114, 119, 344, 356, 460
nox\tasks.py             86      0     28      0   100%
nox\tox_to_nox.py        17      0      2      0   100%
nox\virtualenv.py       146     17     50      2    88%   62, 170, 172->175, 175, 179-206, 243, 307, 326->327, 327
nox\workflow.py          13      0      6      0   100%
-----------------------------------------------------------------
TOTAL                   951     29    344      2    97%
nox > Command coverage report --fail-under=100 --show-missing failed with exit code 2
nox > Session cover failed.
nox > Ran multiple sessions:
nox > * tests-3.7: success
nox > * cover: failed

@theacodes
Copy link
Collaborator

theacodes commented Dec 31, 2019 via email

@lewoudar
Copy link
Contributor Author

it's true that it's more the coverage that didn't work than the tests, sorry for this lack of precision.

the pr is created :)

@stsewd
Copy link
Collaborator

stsewd commented Jan 6, 2020

This was fixed in #270. Thanks for the PR!

@stsewd stsewd closed this as completed Jan 6, 2020
@lewoudar
Copy link
Contributor Author

lewoudar commented Jan 6, 2020

I am just curious about why coverage fails on my laptop and not on CI.
Also for my culture why does CI installs miniconda while conda tests are not running?

@stsewd
Copy link
Collaborator

stsewd commented Jan 6, 2020

I am just curious about why coverage fails on my laptop and not on CI.

@lewoudar are you running on widows? If so, I think this is the cause https://github.com/theacodes/nox/blob/8151acdf0a8206559a0c42e50b0b199c5592da8e/noxfile.py#L49-L53 (probably we should check if the platform is windows too), there are some lines that aren't needed/run on windows, so coverage is lower than unix-like platforms.

Also for my culture why does CI installs miniconda while conda tests are not running?

Not sure about that one

@cs01
Copy link
Contributor

cs01 commented Jan 6, 2020

I am just curious about why coverage fails on my laptop and not on CI.

It fails because several tests were skipped when running on your laptop due to test logic, and hence less code was exercised (covered) by the tests. The s in the test output indicates tests are skipped. Four tests were skipped in test_virtualenv.py, bringing the coverage below 99%, which constitutes a failure:

tests\test_virtualenv.py ...ss..s.......s............................... 

You can see the logic for skipping tests in the test source code, such as @pytest.mark.skipif(not HAS_CONDA, reason="Missing conda command.").

@lewoudar
Copy link
Contributor Author

lewoudar commented Jan 6, 2020

@stsewd yes I'm using Windows
Thank you guys for those answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants