diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:59:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:59:18 +0000 |
commit | fa60720fe95711a68dd4f1cb57fbc79fc6fc2e5c (patch) | |
tree | a8712923a49e76a6241f151af877900e056ce65d /tests/test_helper.py | |
parent | Initial commit. (diff) | |
download | asciinema-fa60720fe95711a68dd4f1cb57fbc79fc6fc2e5c.tar.xz asciinema-fa60720fe95711a68dd4f1cb57fbc79fc6fc2e5c.zip |
Adding upstream version 2.4.0.upstream/2.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_helper.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_helper.py b/tests/test_helper.py new file mode 100644 index 0000000..03b7e97 --- /dev/null +++ b/tests/test_helper.py @@ -0,0 +1,16 @@ +import sys +from codecs import StreamReader +from io import StringIO +from typing import Optional, TextIO, Union + +stdout: Optional[Union[TextIO, StreamReader]] = None + + +class Test: + def setUp(self) -> None: + global stdout # pylint: disable=global-statement + self.real_stdout = sys.stdout + sys.stdout = stdout = StringIO() + + def tearDown(self) -> None: + sys.stdout = self.real_stdout |