Fix FD leak in test__get_multicapture (#7037)

Instantiating `FDCapture` creates a file descriptor already.  Use "no"
to not leak a fd here.
This commit is contained in:
Daniel Hahler
2020-04-08 18:11:31 +02:00
committed by GitHub
parent 4fd2623c12
commit 7048d5be9c

View File

@@ -1489,7 +1489,7 @@ def test_encodedfile_writelines(tmpfile: BinaryIO) -> None:
def test__get_multicapture() -> None:
assert isinstance(_get_multicapture("fd"), MultiCapture)
assert isinstance(_get_multicapture("no"), MultiCapture)
pytest.raises(ValueError, _get_multicapture, "unknown").match(
r"^unknown capturing method: 'unknown'"
)