Skip to content

Commit 4389838

Browse files
committed
Fix all tests are skipped on Windows
1 parent daba0aa commit 4389838

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

scripts/tests/test_translation_fixer/conftest.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@
1010
)
1111

1212

13-
def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
13+
THIS_DIR = Path(__file__).parent.resolve()
14+
15+
16+
def pytest_collection_modifyitems(config, items: list[pytest.Item]) -> None:
17+
if sys.platform != "win32":
18+
return
19+
1420
for item in items:
15-
item.add_marker(skip_on_windows)
21+
item_path = Path(item.fspath).resolve()
22+
if item_path.is_relative_to(THIS_DIR):
23+
item.add_marker(skip_on_windows)
1624

1725

1826
@pytest.fixture(name="runner")

0 commit comments

Comments
 (0)