File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -335,12 +335,20 @@ def _image_directories(func):
335335 # namespace package pip installed and run via the nose
336336 # multiprocess plugin or as a specific test this may be
337337 # 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 )
339345 subdir = os .path .join (* mods )
340346
341347 import imp
342348 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)."""
344352 res = None
345353 for sub_mod in module_name .split ('.' ):
346354 try :
You can’t perform that action at this time.
0 commit comments