Skip to content

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

Closed

Description

@Kojoley

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

Activity

  1. Kojoley commented on Jul 8, 2016

    @Kojoley
    MemberAuthor

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

  2. jenshnielsen commented on Jul 8, 2016

    @jenshnielsen
    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?

  3. Kojoley commented on Jul 8, 2016

    @Kojoley
    MemberAuthor

    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.

  4. jenshnielsen commented on Jul 9, 2016

    @jenshnielsen
    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

  5. Kojoley commented on Jul 9, 2016

    @Kojoley
    MemberAuthor

    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?

  6. tacaswell commented on Jul 9, 2016

    @tacaswell
    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.

  7. QuLogic commented on Feb 14, 2017

    @QuLogic
    Member

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

  8. added this to the milestone on Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions