Skip to content

Commit d3a21bd

Browse files
committed
Eliminate warning about TestDataLoader being collected by pytest #380
1 parent cd6836b commit d3a21bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openeo/testing/io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class PreprocessError(ValueError):
1010
pass
1111

12+
1213
class TestDataLoader:
1314
"""
1415
Test data helper: easily resolve paths to test data files,
@@ -31,6 +32,9 @@ def test_data() -> TestDataLoader:
3132
Improved ``preprocess``: can now be a replacement dict (with regex support).
3233
"""
3334

35+
# Avoid pytest collecting this class as a test case (as it starts with "Test" prefix)
36+
__test__ = False
37+
3438
def __init__(self, root: Union[str, Path]):
3539
self.data_root = Path(root)
3640

0 commit comments

Comments
 (0)