We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c17ff77 commit 5df2fb3Copy full SHA for 5df2fb3
tests/conftest.py
@@ -7,9 +7,9 @@
7
# 3rd party
8
from pytest_mypy_plugins.collect import YamlTestFile, pytest_addoption # noqa: F401
9
10
- def pytest_collect_file(path, parent) -> Optional[YamlTestFile]: # noqa: MAN001
11
- if path.ext == ".yaml" and path.basename.startswith(("test-", "test_")):
12
- return YamlTestFile.from_parent(parent, fspath=path)
+ def pytest_collect_file(file_path, parent) -> Optional[YamlTestFile]: # noqa: MAN001
+ if file_path.suffix == ".yaml" and file_path.name.startswith(("test-", "test_")):
+ return YamlTestFile.from_parent(parent, path=file_path, fspath=None)
13
return None
14
15
except ImportError:
0 commit comments