diff --git a/colorama/tests/initialise_test.py b/colorama/tests/initialise_test.py index 2f7384d..1498bfe 100644 --- a/colorama/tests/initialise_test.py +++ b/colorama/tests/initialise_test.py @@ -6,7 +6,7 @@ from mock import patch from ..ansitowin32 import StreamWrapper -from ..initialise import init +from ..initialise import init, deinit from .utils import osname, redirected_output, replace_by orig_stdout = sys.stdout @@ -22,6 +22,7 @@ def setUp(self): def tearDown(self): sys.stdout = orig_stdout sys.stderr = orig_stderr + deinit() def assertWrapped(self): self.assertIsNot(sys.stdout, orig_stdout, 'stdout should be wrapped') @@ -96,11 +97,13 @@ def testAutoResetPassedOn(self, mockATW32, _): def testAutoResetChangeable(self, mockATW32): with osname("nt"): init() + deinit() init(autoreset=True) self.assertEqual(len(mockATW32.call_args_list), 4) self.assertEqual(mockATW32.call_args_list[2][1]['autoreset'], True) self.assertEqual(mockATW32.call_args_list[3][1]['autoreset'], True) + deinit() init() self.assertEqual(len(mockATW32.call_args_list), 6)