Skip to content

KnownFailure becomes an error with --processes=1 flag #6708

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

Closed
Kojoley opened this issue Jul 8, 2016 · 7 comments
Closed

KnownFailure becomes an error with --processes=1 flag #6708

Kojoley opened this issue Jul 8, 2016 · 7 comments
Milestone

Comments

@Kojoley
Copy link
Member

Kojoley commented Jul 8, 2016

If I supply number of processes to tests.py every KnownFailure become an error (with --processes=0 all is ok)

Here is the log tests.txt

>python -c "import platform; print(platform.platform())"
Windows-7-6.1.7601-SP2

>python -c "import sys; print(sys.version)"
2.7.12 |Continuum Analytics, Inc.| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)]

>pip freeze | grep nose
nose==1.3.7
@Kojoley
Copy link
Member Author

Kojoley commented Jul 8, 2016

It seems to be a bug in the nose.
This line does not help, every spawned child has the default multiprocess._instantiate_plugins = None

@jenshnielsen
Copy link
Member

Which version of nose are you using. This seems to be working correctly on travis. See https://github.com/matplotlib/matplotlib/blob/master/.travis.yml

what does matplotlib._get_extra_test_plugins() return?

@Kojoley
Copy link
Member Author

Kojoley commented Jul 8, 2016

Nose version is 1.3.7. matplotlib._get_extra_test_plugins() returns what it should [matplotlib.testing.noseclasses.KnownFailure, nose.plugins.base.Plugin].
Hmm. According to this https://travis-ci.org/matplotlib/matplotlib/jobs/143332745 --processes=$NPROC where NPROC=2. I think this bug is Windows related stuff because nose uses fork on Linux.

@jenshnielsen
Copy link
Member

Is it specific to NPROC=1? In the medium term we probably want to switch from nose to pytest (hopefully before matplotlib 2.1) so if it only happens for NPROC=1 it might not be worth fixing it at this stage

@Kojoley
Copy link
Member Author

Kojoley commented Jul 9, 2016

No, it is not specific to --processes=1, it is the same for 2, 3, 4, etc. If --processes value is not 0 then nose uses multiprocess plugin and spawn workers (child processes) to perform tests. On my machine (Windows OS) the value of multiprocess._instantiate_plugins is not populated from the main thread to the child threads.
I have solved this issue this way: nose-devs/nose#1005
Is there anything I can help with in migration to pytest?

@tacaswell
Copy link
Member

Work to migrate started in: #5405 but that rebase onto current master will not be fun.

https://github.com/astrofrog/pytest-mpl provides a replacement for the nose image test plugins, not sure how hard it would be too re-write our decorators to use that.

If you tackle this (which would be awesome) I would suggest starting from getting all of the tests to run under pytest before converting all of the assertions.

@QuLogic
Copy link
Member

QuLogic commented Feb 14, 2017

We aren't using nose any more and parallel pytest seems to work in AppVeyor, so I'm going to close this.

@QuLogic QuLogic closed this as completed Feb 14, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Feb 14, 2017
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

No branches or pull requests

4 participants