diff options
author | Mike Frysinger <vapier@google.com> | 2019-06-13 02:24:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-01-06 18:53:58 +0000 |
commit | acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4 (patch) | |
tree | e7b65524857d00cec6b36c989659afd1132d15ce /tests/test_wrapper.py | |
parent | 784ccfc040dc8efa1a64d3c7d4070b66beb15d08 (diff) | |
download | git-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.py | 14 |
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 | ||
17 | import contextlib | 17 | import contextlib |
18 | from io import StringIO | ||
18 | import os | 19 | import os |
19 | import re | 20 | import re |
20 | import shutil | 21 | import shutil |
21 | import tempfile | 22 | import tempfile |
22 | import unittest | 23 | import unittest |
24 | from unittest import mock | ||
23 | 25 | ||
24 | import git_command | 26 | import git_command |
25 | import main | 27 | import main |
26 | import platform_utils | 28 | import platform_utils |
27 | from pyversion import is_python3 | ||
28 | import wrapper | 29 | import wrapper |
29 | 30 | ||
30 | 31 | ||
31 | if is_python3(): | ||
32 | from unittest import mock | ||
33 | from io import StringIO | ||
34 | else: | ||
35 | import mock | ||
36 | from StringIO import StringIO | ||
37 | |||
38 | |||
39 | @contextlib.contextmanager | 32 | @contextlib.contextmanager |
40 | def TemporaryDirectory(): | 33 | def 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 | ||
69 | class RepoWrapperUnitTest(RepoWrapperTestCase): | 59 | class RepoWrapperUnitTest(RepoWrapperTestCase): |
70 | """Tests helper functions in the repo wrapper | 60 | """Tests helper functions in the repo wrapper |