capture: improve NoCapture typing

This commit is contained in:
Ran Benita
2023-01-21 10:53:28 +02:00
parent 54911acf8d
commit 54b8b40f83
2 changed files with 26 additions and 5 deletions

View File

@@ -1052,6 +1052,7 @@ class TestFDCapture:
)
)
# Should not crash with missing "_old".
assert isinstance(cap.syscapture, capture.SysCapture)
assert repr(cap.syscapture) == (
"<SysCapture stdout _old=<UNSET> _state='done' tmpfile={!r}>".format(
cap.syscapture.tmpfile