Ignore hidden files (.testmondata) in test_pytest_collect_file
`test_pytest_collect_file` fails if you run the tests using `--testmon`, because pytest-testmon will put its DB there as `.testmondata`.
This commit is contained in:
parent
d81ee9acfb
commit
e9d7989140
|
@ -150,7 +150,9 @@ class TestCollectPluginHookRelay:
|
|||
wascalled = []
|
||||
class Plugin:
|
||||
def pytest_collect_file(self, path, parent):
|
||||
wascalled.append(path)
|
||||
if not path.basename.startswith("."):
|
||||
# Ignore hidden files, e.g. .testmondata.
|
||||
wascalled.append(path)
|
||||
testdir.makefile(".abc", "xyz")
|
||||
pytest.main([testdir.tmpdir], plugins=[Plugin()])
|
||||
assert len(wascalled) == 1
|
||||
|
|
Loading…
Reference in New Issue