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.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py
index 5e2cfa57..d8713738 100644
--- a/tests/test_wrapper.py
+++ b/tests/test_wrapper.py
@@ -15,27 +15,20 @@
15"""Unittests for the wrapper.py module.""" 15"""Unittests for the wrapper.py module."""
16 16
17import contextlib 17import contextlib
18from io import StringIO
18import os 19import os
19import re 20import re
20import shutil 21import shutil
21import tempfile 22import tempfile
22import unittest 23import unittest
24from unittest import mock
23 25
24import git_command 26import git_command
25import main 27import main
26import platform_utils 28import platform_utils
27from pyversion import is_python3
28import wrapper 29import wrapper
29 30
30 31
31if is_python3():
32 from unittest import mock
33 from io import StringIO
34else:
35 import mock
36 from StringIO import StringIO
37
38
39@contextlib.contextmanager 32@contextlib.contextmanager
40def TemporaryDirectory(): 33def TemporaryDirectory():
41 """Create a new empty git checkout for testing.""" 34 """Create a new empty git checkout for testing."""
@@ -62,9 +55,6 @@ class RepoWrapperTestCase(unittest.TestCase):
62 wrapper._wrapper_module = None 55 wrapper._wrapper_module = None
63 self.wrapper = wrapper.Wrapper() 56 self.wrapper = wrapper.Wrapper()
64 57
65 if not is_python3():
66 self.assertRegex = self.assertRegexpMatches
67
68 58
69class RepoWrapperUnitTest(RepoWrapperTestCase): 59class RepoWrapperUnitTest(RepoWrapperTestCase):
70 """Tests helper functions in the repo wrapper 60 """Tests helper functions in the repo wrapper