summaryrefslogtreecommitdiffstats
path: root/tests/test_wrapper.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2019-06-13 02:24:21 -0400
committerMike Frysinger <vapier@google.com>2021-01-06 18:53:58 +0000
commitacf63b28928b33d1335dfed1af7e2d8fc6bb5fc4 (patch)
treee7b65524857d00cec6b36c989659afd1132d15ce /tests/test_wrapper.py
parent784ccfc040dc8efa1a64d3c7d4070b66beb15d08 (diff)
downloadgit-repo-acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4.tar.gz
drop pyversion & is_python3 checking
We're committed to Python 3 at this point, so purge all the is_python3 related dynamic checks. Bug: https://crbug.com/gerrit/10418 Change-Id: I4c8b405d6de359b8b83223c9f4b9c8ffa18ea1a2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292383 Reviewed-by: Chris Mcdonald <cjmcdonald@google.com> Tested-by: Mike Frysinger <vapier@google.com>
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