We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pytest >= 8
1 parent da3ea8b commit f56b77aCopy full SHA for f56b77a
1 file changed
conftest.py
@@ -1,24 +1,23 @@
1
+from pathlib import Path
2
import math
-
3
import numpy
4
import pytest
5
6
import compas
7
from compas.geometry import allclose
8
9
10
-def pytest_ignore_collect(path):
11
- if "rhino" in str(path):
12
- return True
13
14
- if "blender" in str(path):
+def pytest_ignore_collect(collection_path: Path, config):
+ # Skip anything under rhino/blender/ghpython, or files ending with _cli.py
+ parts_lower = {p.lower() for p in collection_path.parts}
+ if {"rhino", "blender", "ghpython"} & parts_lower:
15
return True
16
17
- if "ghpython" in str(path):
+ if collection_path.name.endswith("_cli.py"):
18
19
20
- if str(path).endswith("_cli.py"):
21
+ # return None -> don't ignore
+ return None
22
23
24
@pytest.fixture(autouse=True)
0 commit comments