From 5a5427c3888e2619d53f6943447b7db5bf082366 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 18:27:43 +0200 Subject: Adding upstream version 2.2.0. Signed-off-by: Daniel Baumann --- tests/test_helper.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_helper.py (limited to 'tests/test_helper.py') 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 -- cgit v1.2.3