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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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'"
)