summaryrefslogtreecommitdiffstats
path: root/tests/test_wrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_wrapper.py')
-rw-r--r--tests/test_wrapper.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py
index 4e8263b2..ef4dce10 100644
--- a/tests/test_wrapper.py
+++ b/tests/test_wrapper.py
@@ -14,7 +14,7 @@
14 14
15"""Unittests for the wrapper.py module.""" 15"""Unittests for the wrapper.py module."""
16 16
17from io import StringIO 17import io
18import os 18import os
19import re 19import re
20import sys 20import sys
@@ -47,8 +47,10 @@ class RepoWrapperUnitTest(RepoWrapperTestCase):
47 def test_version(self): 47 def test_version(self):
48 """Make sure _Version works.""" 48 """Make sure _Version works."""
49 with self.assertRaises(SystemExit) as e: 49 with self.assertRaises(SystemExit) as e:
50 with mock.patch("sys.stdout", new_callable=StringIO) as stdout: 50 with mock.patch("sys.stdout", new_callable=io.StringIO) as stdout:
51 with mock.patch("sys.stderr", new_callable=StringIO) as stderr: 51 with mock.patch(
52 "sys.stderr", new_callable=io.StringIO
53 ) as stderr:
52 self.wrapper._Version() 54 self.wrapper._Version()
53 self.assertEqual(0, e.exception.code) 55 self.assertEqual(0, e.exception.code)
54 self.assertEqual("", stderr.getvalue()) 56 self.assertEqual("", stderr.getvalue())