Skip to content

Commit

Permalink
Merge pull request #5387 from jenshnielsen/pipmptesting
Browse files Browse the repository at this point in the history
Fix #3314 assert mods.pop(0) fails
  • Loading branch information
tacaswell committed Nov 3, 2015
1 parent feaf9c6 commit 1e4823b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/matplotlib/testing/decorators.py
Expand Up @@ -328,8 +328,13 @@ def _image_directories(func):
subdir = os.path.splitext(os.path.split(script_name)[1])[0]
else:
mods = module_name.split('.')
mods.pop(0) # <- will be the name of the package being tested (in
# most cases "matplotlib")
if len(mods) >= 3:
mods.pop(0)
# mods[0] will be the name of the package being tested (in
# most cases "matplotlib") However if this is a
# namespace package pip installed and run via the nose
# multiprocess plugin or as a specific test this may be
# missing. See https://github.com/matplotlib/matplotlib/issues/3314
assert mods.pop(0) == 'tests'
subdir = os.path.join(*mods)

Expand Down

0 comments on commit 1e4823b

Please sign in to comment.