Lines Matching refs:start_dir
242 def discover(self, start_dir, pattern='test*.py', top_level_dir=None): argument
276 top_level_dir = start_dir
291 if os.path.isdir(os.path.abspath(start_dir)):
292 start_dir = os.path.abspath(start_dir)
293 if start_dir != top_level_dir:
294 is_not_importable = not os.path.isfile(os.path.join(start_dir, '__init__.py'))
298 __import__(start_dir)
302 the_module = sys.modules[start_dir]
303 top_part = start_dir.split('.')[0]
305 start_dir = os.path.abspath(
346 raise ImportError('Start directory is not importable: %r' % start_dir)
349 tests = list(self._find_tests(start_dir, pattern))
384 def _find_tests(self, start_dir, pattern, namespace=False): argument
387 name = self._get_name_from_path(start_dir)
394 start_dir, pattern, namespace)
402 paths = sorted(os.listdir(start_dir))
404 full_path = os.path.join(start_dir, path)