From acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 13 Jun 2019 02:24:21 -0400 Subject: 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 Tested-by: Mike Frysinger --- tests/test_wrapper.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tests/test_wrapper.py') 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 @@ """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 @@ class RepoWrapperTestCase(unittest.TestCase): 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 -- cgit v1.2.3-54-g00ecf