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>
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py
index 5e2cfa5..d871373 100644
--- a/tests/test_wrapper.py
+++ b/tests/test_wrapper.py
@@ -15,27 +15,20 @@
"""Unittests for the wrapper.py module."""
import contextlib
+from io import StringIO
import os
import re
import shutil
import tempfile
import unittest
+from unittest import mock
import git_command
import main
import platform_utils
-from pyversion import is_python3
import wrapper
-if is_python3():
- from unittest import mock
- from io import StringIO
-else:
- import mock
- from StringIO import StringIO
-
-
@contextlib.contextmanager
def TemporaryDirectory():
"""Create a new empty git checkout for testing."""
@@ -62,9 +55,6 @@
wrapper._wrapper_module = None
self.wrapper = wrapper.Wrapper()
- if not is_python3():
- self.assertRegex = self.assertRegexpMatches
-
class RepoWrapperUnitTest(RepoWrapperTestCase):
"""Tests helper functions in the repo wrapper