diff options
author | Mohit Solanki <mohitsolanki619@gmail.com> | 2019-09-10 13:26:55 +0530 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2019-09-10 13:15:09 +0200 |
commit | a2d8a5144bd8c0940d9f2593a21aec8bebf7c035 (patch) | |
tree | e7a7874da27245018b7cee9efeccc1622023859c /git/test/test_git.py | |
parent | 07657929bc6c0339d4d2e7e1dde1945199374b90 (diff) | |
download | gitpython-a2d8a5144bd8c0940d9f2593a21aec8bebf7c035.tar.gz |
Fix #889: Add DeepSource config and fix some major issues
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 4a189267..357d9edb 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -134,15 +134,18 @@ class TestGit(TestBase): def test_persistent_cat_file_command(self): # read header only - import subprocess as sp hexsha = "b2339455342180c7cc1e9bba3e9f181f7baa5167" - g = self.git.cat_file(batch_check=True, istream=sp.PIPE, as_process=True) + g = self.git.cat_file( + batch_check=True, istream=subprocess.PIPE, as_process=True + ) g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n") g.stdin.flush() obj_info = g.stdout.readline() # read header + data - g = self.git.cat_file(batch=True, istream=sp.PIPE, as_process=True) + g = self.git.cat_file( + batch=True, istream=subprocess.PIPE, as_process=True + ) g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n") g.stdin.flush() obj_info_two = g.stdout.readline() @@ -160,7 +163,7 @@ class TestGit(TestBase): # same can be achieved using the respective command functions hexsha, typename, size = self.git.get_object_header(hexsha) - hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) # @UnusedVariable + hexsha, typename_two, size_two, _ = self.git.get_object_data(hexsha) self.assertEqual(typename, typename_two) self.assertEqual(size, size_two) @@ -264,7 +267,7 @@ class TestGit(TestBase): remote.fetch() except GitCommandError as err: if sys.version_info[0] < 3 and is_darwin: - self.assertIn('ssh-orig, ' in str(err)) + self.assertIn('ssh-orig', str(err)) self.assertEqual(err.status, 128) else: self.assertIn('FOO', str(err)) |