File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,7 @@ def pytest_addoption(parser: Parser) -> None:
63
63
"*.egg" ,
64
64
".*" ,
65
65
"_darcs" ,
66
- "build" ,
67
66
"CVS" ,
68
- "dist" ,
69
67
"node_modules" ,
70
68
"venv" ,
71
69
"{arch}" ,
Original file line number Diff line number Diff line change @@ -135,10 +135,19 @@ def test_foo():
135
135
136
136
137
137
class TestCollectFS :
138
+ def test_build_conditional_ignore (self , pytester : Pytester ) -> None :
139
+ tmp_path = pytester .path
140
+ ensure_file (tmp_path / "build" / "test_found.py" )
141
+ ensure_file (tmp_path / "dist" / "test_found.py" )
142
+ for x in tmp_path .rglob ("test_*.py" ):
143
+ x .write_text ("def test_hello(): pass" , encoding = "utf-8" )
144
+
145
+ result = pytester .runpytest ("--collect-only" )
146
+ s = result .stdout .str ()
147
+ assert "test_found" in s
148
+
138
149
def test_ignored_certain_directories (self , pytester : Pytester ) -> None :
139
150
tmp_path = pytester .path
140
- ensure_file (tmp_path / "build" / "test_notfound.py" )
141
- ensure_file (tmp_path / "dist" / "test_notfound.py" )
142
151
ensure_file (tmp_path / "_darcs" / "test_notfound.py" )
143
152
ensure_file (tmp_path / "CVS" / "test_notfound.py" )
144
153
ensure_file (tmp_path / "{arch}" / "test_notfound.py" )
You can’t perform that action at this time.
0 commit comments