Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e4823b

Browse filesBrowse files
committed
Merge pull request #5387 from jenshnielsen/pipmptesting
Fix #3314 assert mods.pop(0) fails
1 parent feaf9c6 commit 1e4823b
Copy full SHA for 1e4823b

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎lib/matplotlib/testing/decorators.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/decorators.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,13 @@ def _image_directories(func):
328328
subdir = os.path.splitext(os.path.split(script_name)[1])[0]
329329
else:
330330
mods = module_name.split('.')
331-
mods.pop(0) # <- will be the name of the package being tested (in
332-
# most cases "matplotlib")
331+
if len(mods) >= 3:
332+
mods.pop(0)
333+
# mods[0] will be the name of the package being tested (in
334+
# most cases "matplotlib") However if this is a
335+
# namespace package pip installed and run via the nose
336+
# multiprocess plugin or as a specific test this may be
337+
# missing. See https://github.com/matplotlib/matplotlib/issues/3314
333338
assert mods.pop(0) == 'tests'
334339
subdir = os.path.join(*mods)
335340

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.