diff options
author | Craig Northway <craig.northway@gmail.com> | 2014-07-25 11:26:48 +1000 |
---|---|---|
committer | Craig Northway <craig.northway@gmail.com> | 2014-07-25 19:19:22 +1000 |
commit | a23d0d8617ba3119069e610fc7b0850a17322726 (patch) | |
tree | d8bc5213dd7e7c7f0befdf65afecb13d5435f873 /git/test/db/py/test_git.py | |
parent | 75194159abce545bfa38c3172efb42da9b0017dc (diff) | |
download | gitpython-a23d0d8617ba3119069e610fc7b0850a17322726.tar.gz |
Autopep8 fixes with maximum line length 120
Diffstat (limited to 'git/test/db/py/test_git.py')
-rw-r--r-- | git/test/db/py/test_git.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/git/test/db/py/test_git.py b/git/test/db/py/test_git.py index 4f5b5fb5..207d2864 100644 --- a/git/test/db/py/test_git.py +++ b/git/test/db/py/test_git.py @@ -11,15 +11,16 @@ from git.util import hex_to_bin, bin_to_hex import os + class TestGitDB(TestDBBase): needs_ro_repo = False - + def test_reading(self): gdb = PureGitODB(os.path.join(rorepo_dir(), 'objects')) - + # we have packs and loose objects, alternates doesn't necessarily exist assert 1 < len(gdb.databases()) < 4 - + # access should be possible git_sha = hex_to_bin("5aebcd5cb3340fb31776941d7e4d518a712a8655") assert isinstance(gdb.info(git_sha), OInfo) @@ -27,25 +28,24 @@ class TestGitDB(TestDBBase): assert gdb.size() > 200 sha_list = list(gdb.sha_iter()) assert len(sha_list) == gdb.size() - - - # This is actually a test for compound functionality, but it doesn't + + # This is actually a test for compound functionality, but it doesn't # have a separate test module # test partial shas # this one as uneven and quite short assert gdb.partial_to_complete_sha_hex('5aebcd') == hex_to_bin("5aebcd5cb3340fb31776941d7e4d518a712a8655") - + # mix even/uneven hexshas for i, binsha in enumerate(sha_list[:50]): - assert gdb.partial_to_complete_sha_hex(bin_to_hex(binsha)[:8-(i%2)]) == binsha + assert gdb.partial_to_complete_sha_hex(bin_to_hex(binsha)[:8 - (i % 2)]) == binsha # END for each sha - + self.failUnlessRaises(BadObject, gdb.partial_to_complete_sha_hex, "0000") - + @with_rw_directory def test_writing(self, path): gdb = PureGitODB(path) - + # its possible to write objects self._assert_object_writing(gdb) self._assert_object_writing_async(gdb) |