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 @@ -335,12 +335,20 @@ def _image_directories(func):
335
335
# namespace package pip installed and run via the nose
336
336
# multiprocess plugin or as a specific test this may be
337
337
# missing. See https://github.com/matplotlib/matplotlib/issues/3314
338
- assert mods .pop (0 ) == 'tests'
338
+ if mods .pop (0 ) != 'tests' :
339
+ warnings .warn (("Module '%s' does not live in a parent module "
340
+ "named 'tests'. This is probably ok, but we may not be able "
341
+ "to guess the correct subdirectory containing the baseline "
342
+ "images. If things go wrong please make sure that there is "
343
+ "a parent directory named 'tests' and that it contains a "
344
+ "__init__.py file (can be empty)." ) % module_name )
339
345
subdir = os .path .join (* mods )
340
346
341
347
import imp
342
348
def find_dotted_module (module_name , path = None ):
343
- """A version of imp which can handle dots in the module name"""
349
+ """A version of imp which can handle dots in the module name.
350
+ As for imp.find_module(), the return value is a 3-element
351
+ tuple (file, pathname, description)."""
344
352
res = None
345
353
for sub_mod in module_name .split ('.' ):
346
354
try :
You can’t perform that action at this time.
0 commit comments