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:
parent
4fd2623c12
commit
7048d5be9c
|
@ -1489,7 +1489,7 @@ def test_encodedfile_writelines(tmpfile: BinaryIO) -> None:
|
||||||
|
|
||||||
|
|
||||||
def test__get_multicapture() -> 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(
|
pytest.raises(ValueError, _get_multicapture, "unknown").match(
|
||||||
r"^unknown capturing method: 'unknown'"
|
r"^unknown capturing method: 'unknown'"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue