File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -359,12 +359,20 @@ def _image_directories(func):
359
359
# namespace package pip installed and run via the nose
360
360
# multiprocess plugin or as a specific test this may be
361
361
# missing. See https://github.com/matplotlib/matplotlib/issues/3314
362
- assert mods .pop (0 ) == 'tests'
362
+ if mods .pop (0 ) != 'tests' :
363
+ warnings .warn (("Module '%s' does not live in a parent module "
364
+ "named 'tests'. This is probably ok, but we may not be able "
365
+ "to guess the correct subdirectory containing the baseline "
366
+ "images. If things go wrong please make sure that there is "
367
+ "a parent directory named 'tests' and that it contains a "
368
+ "__init__.py file (can be empty)." ) % module_name )
363
369
subdir = os .path .join (* mods )
364
370
365
371
import imp
366
372
def find_dotted_module (module_name , path = None ):
367
- """A version of imp which can handle dots in the module name"""
373
+ """A version of imp which can handle dots in the module name.
374
+ As for imp.find_module(), the return value is a 3-element
375
+ tuple (file, pathname, description)."""
368
376
res = None
369
377
for sub_mod in module_name .split ('.' ):
370
378
try :
You can’t perform that action at this time.
0 commit comments