Skip to content

Commit 4543e19

Browse files
committed
test: Fix check for missing submodule
1 parent dd97c3c commit 4543e19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def examples() -> Path:
1212
"""Get bids-examples from submodule, allow environment variable override."""
1313
ret = os.getenv('BIDS_EXAMPLES')
1414
if not ret:
15-
ret = importlib.resources.files(__package__) / 'data' / 'bids-examples'
16-
if not ret.exists():
17-
pytest.skip('Missing examples')
15+
ret = importlib.resources.files() / 'data' / 'bids-examples'
16+
if not any(ret.iterdir()):
17+
pytest.skip('bids-examples submodule is not checked out')
1818
return Path(ret)

0 commit comments

Comments
 (0)