Skip to content

assert mods.pop(0) == 'tests' errors for multiprocess tests on OSX #3314

Closed

Description

@matthew-brett

I'm testing OSX builds using Matt Terry's build grid. All the matplotlib builds are giving multiple errors like this:

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/loader.py", line 284, in generate
    for test in g():
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 152, in test
    baseline_dir, result_dir = _image_directories(self._func)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 303, in _image_directories
    assert mods.pop(0) == 'tests'
AssertionError

See: https://s3.amazonaws.com/archive.travis-ci.org/jobs/30794968/log.txt

It's not clear where the failures are coming from, but this is an excerpt from the stdout of the tests.

matplotlib.tests.test_triangulation.test_tri_smooth_contouring.test ... ok
Failure: AssertionError () ... FAIL
matplotlib.tests.test_triangulation.test_triinterpcubic_C1_continuity ... ok
matplotlib.tests.test_triangulation.test_tri_smooth_gradient.test ... ok
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
Failure: AssertionError () ... FAIL
matplotlib.tests.test_transforms.test_pre_transform_plotting.test ... ok

I can replicate the failures on my laptop in a clean virtual machine, but only when running the tests via the multiprocessing plugin:

python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300

Running in single process mode gives no failures. Does anyone have any idea how I could investigate further?

Activity

  1. changed the title [-]`assert mods.pop(0) == 'tests'` errors for multiprocess tests on OSX[/-] [+]assert mods.pop(0) == 'tests' errors for multiprocess tests on OSX[/+] on Jul 27, 2014
  2. added a commit that references this issue on Jul 27, 2014
  3. WeatherGod commented on Jul 27, 2014

    @WeatherGod
    Member

    I ran into this recently, too, but couldn't reproduce it after doing a
    clean build.
    On Jul 26, 2014 10:31 PM, "Matthew Brett" [email protected] wrote:

    I'm testing OSX builds using Matt Terry's build grid. All the matplotlib
    builds are giving multiple errors like this:

    FAIL: Failure: AssertionError ()

    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/loader.py", line 284, in generate
    for test in g():
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 152, in test
    baseline_dir, result_dir = _image_directories(self._func)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 303, in _image_directories
    assert mods.pop(0) == 'tests'
    AssertionError

    See: https://s3.amazonaws.com/archive.travis-ci.org/jobs/30794968/log.txt

    It's not clear where the failures are coming from, but this is an excerpt
    from the stdout of the tests.

    matplotlib.tests.test_triangulation.test_tri_smooth_contouring.test ... ok
    Failure: AssertionError () ... FAIL
    matplotlib.tests.test_triangulation.test_triinterpcubic_C1_continuity ... ok
    matplotlib.tests.test_triangulation.test_tri_smooth_gradient.test ... ok
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    Failure: AssertionError () ... FAIL
    matplotlib.tests.test_transforms.test_pre_transform_plotting.test ... ok

    I can replicate the failures on my laptop in a clean virtual machine, but
    only when running the tests via the multiprocessing plugin:

    python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300

    Running in single process mode gives no failures. Does anyone have any
    idea how I could investigate further?

    —
    Reply to this email directly or view it on GitHub
    #3314.

  4. matthew-brett commented on Jul 27, 2014

    @matthew-brett
    ContributorAuthor

    The travis builds are clean, though. I suppose it could be something to do with timings, making it somewhat random. But it happens for all the travis builds.

  5. mdboom commented on Jul 28, 2014

    @mdboom
    Member

    This is puzzling -- I can't reproduce locally on my Mac box. It might be helpful if we knew what mods.pop(0) was on that line. Can we add it to the output somehow?

  6. added this to the v1.4.x milestone on Jul 29, 2014
  7. modified the milestones: , v1.4.x on Feb 7, 2015
  8. jenshnielsen commented on Nov 1, 2015

    @jenshnielsen
    Member

    This happens on Travis if I replace python setup.py install with pip install . as part of trying to get #4678 to work

  9. jenshnielsen commented on Nov 2, 2015

    @jenshnielsen
    Member

    Some more debugging shows that this happens for tests within mpl_toolkits

    For regular Matplotlib tests mods is something like ['tests', 'test_cycles'] where
    it returns ['test_mplot3d'] or ['test_axes_grid1'] and so on within mpl_toolkits. Not at all sure why this is different with multiprocessing or why it's different with a pip install

    Edit:

    This is after popping the first element. mods is normally something like ['matplotlib', 'tests', 'test_cycles'] whereas in the mpl_toolkits test mods is ['tests', 'test_mplot3d'] ...

  10. jenshnielsen commented on Nov 2, 2015

    @jenshnielsen
    Member

    The same happens without multiprocessing if you do

    python tests.py mpl_toolkits

    It looks like yet another namespace oddity

  11. mdboom commented on Nov 2, 2015

    @mdboom
    Member

    @jenshnielsen: Thanks for getting to the bottom of this. I'm now able to reproduce...

  12. added 2 commits that reference this issue on Nov 3, 2015
    3dd75e6
    9803924
  13. added a commit that references this issue on Nov 3, 2015
    d771fa7
  14. added a commit that references this issue on Nov 3, 2015
    1e4823b
  15. modified the milestones: , on Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions