From 929f3e1e1b664ed8cdef90a40c96804edfd08d59 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 18 Mar 2018 12:06:10 +0200 Subject: Drop support for EOL Python 2.6 --- git/test/test_repo.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'git/test/test_repo.py') diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 2c3ad957..6985f254 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -9,12 +9,8 @@ from io import BytesIO import itertools import os import pickle -import sys import tempfile -try: - from unittest import skipIf, SkipTest -except ImportError: - from unittest2 import skipIf, SkipTest +from unittest import skipIf, SkipTest try: import pathlib @@ -364,9 +360,6 @@ class TestRepo(TestBase): @patch.object(Git, '_call_process') def test_should_display_blame_information(self, git): - if sys.version_info < (2, 7): - ## Skipped, not `assertRaisesRegexp` in py2.6 - return git.return_value = fixture('blame') b = self.rorepo.blame('master', 'lib/git.py') assert_equal(13, len(b)) @@ -792,8 +785,6 @@ class TestRepo(TestBase): def test_repo_odbtype(self): target_type = GitCmdObjectDB - if sys.version_info[:2] < (2, 5): - target_type = GitCmdObjectDB self.assertIsInstance(self.rorepo.odb, target_type) def test_submodules(self): -- cgit v1.2.1 From 14582df679a011e8c741eb5dcd8126f883e1bc71 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 18 Mar 2018 20:03:02 +0200 Subject: Replace function call with set literal --- git/test/test_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/test/test_repo.py') diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 6985f254..97eac4ae 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -515,7 +515,7 @@ class TestRepo(TestBase): # this is only a preliminary test, more testing done in test_index self.assertEqual(self.rorepo, self.rorepo) self.assertFalse(self.rorepo != self.rorepo) - self.assertEqual(len(set((self.rorepo, self.rorepo))), 1) + self.assertEqual(len({self.rorepo, self.rorepo}), 1) @with_rw_directory def test_tilde_and_env_vars_in_repo_path(self, rw_dir): -- cgit v1.2.1