Skip to content

Commit 0c1259b

Browse files
committed
Fix lint in tests
1 parent 199bbb0 commit 0c1259b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

testing/test_collection.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def test_missing_permissions_on_unselected_directory_doesnt_crash(
277277
known_build_dirs = pytest.mark.parametrize("build_dir", ["build", "dist"])
278278

279279
@known_build_dirs
280-
def test_build_dirs_collected_when_setuptools_setup_py_present(
280+
def test_build_dirs_ignored_when_setuptools_setup_py_present(
281281
self, pytester: Pytester, build_dir: str
282282
) -> None:
283283
tmp_path = pytester.path
@@ -297,8 +297,11 @@ def test_build_dirs_collected_when_setuptools_setup_py_present(
297297
result = pytester.runpytest("--collect-only").stdout.str()
298298
assert "test_module" not in result
299299

300+
result = pytester.runpytest("--collect-only", "--collect-in-build").stdout.str()
301+
assert "test_module" in result
302+
300303
@known_build_dirs
301-
def test_build_dirs_collected_when_setuptools_present_in_pyproject_toml(
304+
def test_build_dirs_ignored_when_setuptools_present_in_pyproject_toml(
302305
self, pytester: Pytester, build_dir: str
303306
) -> None:
304307
tmp_path = pytester.path
@@ -321,6 +324,9 @@ def test_build_dirs_collected_when_setuptools_present_in_pyproject_toml(
321324
result = pytester.runpytest("--collect-only").stdout.str()
322325
assert "test_module" not in result
323326

327+
result = pytester.runpytest("--collect-only", "--collect-in-build").stdout.str()
328+
assert "test_module" in result
329+
324330

325331
class TestCollectPluginHookRelay:
326332
def test_pytest_collect_file(self, pytester: Pytester) -> None:

0 commit comments

Comments
 (0)