parent
941d06e509
commit
b7e47d0e3c
|
@ -16,15 +16,18 @@ class DefaultPlugin:
|
||||||
return parent.Module(path, parent=parent)
|
return parent.Module(path, parent=parent)
|
||||||
|
|
||||||
def pytest_collect_directory(self, path, parent):
|
def pytest_collect_directory(self, path, parent):
|
||||||
|
#excludelist = parent._config.getvalue_pathlist('dir_exclude', path)
|
||||||
|
#if excludelist and path in excludelist:
|
||||||
|
# return
|
||||||
if not parent.recfilter(path):
|
if not parent.recfilter(path):
|
||||||
# check if cmdline specified this dir or a subdir
|
# check if cmdline specified this dir or a subdir directly
|
||||||
for arg in parent.config.args:
|
for arg in parent.config.args:
|
||||||
if path == arg or arg.relto(path):
|
if path == arg or arg.relto(path):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
# not use parent.Directory here as we want
|
# not use parent.Directory here as we generally
|
||||||
# dir/conftest.py to be able to
|
# want dir/conftest.py to be able to
|
||||||
# define Directory(dir) already
|
# define Directory(dir) already
|
||||||
Directory = parent.config.getvalue('Directory', path)
|
Directory = parent.config.getvalue('Directory', path)
|
||||||
return Directory(path, parent=parent)
|
return Directory(path, parent=parent)
|
||||||
|
|
Loading…
Reference in New Issue