diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-19 12:16:44 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-19 12:16:44 +0100 |
commit | 257264743154b975bc156f425217593be14727a9 (patch) | |
tree | 755ccbe76bc225ef237264e1b45bcb17202087ec /git/test/test_index.py | |
parent | 4d9b7b09a7c66e19a608d76282eacc769e349150 (diff) | |
download | gitpython-257264743154b975bc156f425217593be14727a9.tar.gz |
Applied autopep8
Commandline was
autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py index 3440c5be..c1153e5e 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -19,6 +19,7 @@ from gitdb.base import IStream from git.objects import Blob from git.index.typ import BaseIndexEntry + class TestIndex(TestBase): def __init__(self, *args): @@ -68,7 +69,7 @@ class TestIndex(TestBase): last_val = None entry = index.entries.itervalues().next() for attr in ("path", "ctime", "mtime", "dev", "inode", "mode", "uid", - "gid", "size", "binsha", "hexsha", "stage"): + "gid", "size", "binsha", "hexsha", "stage"): val = getattr(entry, attr) # END for each method @@ -104,7 +105,8 @@ class TestIndex(TestBase): if len(blist) != len(index.entries): iset = set(k[0] for k in index.entries.keys()) bset = set(b.path for b in blist) - raise AssertionError("CMP Failed: Missing entries in index: %s, missing in tree: %s" % (bset - iset, iset - bset)) + raise AssertionError("CMP Failed: Missing entries in index: %s, missing in tree: %s" % + (bset - iset, iset - bset)) # END assertion message @with_rw_repo('0.1.6') @@ -457,7 +459,8 @@ class TestIndex(TestBase): assert len(entries) == 14 # same file - entries = index.reset(new_commit).add([os.path.abspath(os.path.join('lib', 'git', 'head.py'))] * 2, fprogress=self._fprogress_add) + entries = index.reset(new_commit).add( + [os.path.abspath(os.path.join('lib', 'git', 'head.py'))] * 2, fprogress=self._fprogress_add) self._assert_entries(entries) assert entries[0].mode & 0644 == 0644 # would fail, test is too primitive to handle this case @@ -478,12 +481,14 @@ class TestIndex(TestBase): # mode 0 not allowed null_hex_sha = Diff.NULL_HEX_SHA null_bin_sha = "\0" * 20 - self.failUnlessRaises(ValueError, index.reset(new_commit).add, [BaseIndexEntry((0, null_bin_sha, 0, "doesntmatter"))]) + self.failUnlessRaises(ValueError, index.reset( + new_commit).add, [BaseIndexEntry((0, null_bin_sha, 0, "doesntmatter"))]) # add new file new_file_relapath = "my_new_file" new_file_path = self._make_file(new_file_relapath, "hello world", rw_repo) - entries = index.reset(new_commit).add([BaseIndexEntry((010644, null_bin_sha, 0, new_file_relapath))], fprogress=self._fprogress_add) + entries = index.reset(new_commit).add( + [BaseIndexEntry((010644, null_bin_sha, 0, new_file_relapath))], fprogress=self._fprogress_add) self._assert_entries(entries) self._assert_fprogress(entries) assert len(entries) == 1 and entries[0].hexsha != null_hex_sha @@ -678,7 +683,7 @@ class TestIndex(TestBase): fileobj = StringIO(contents) filename = 'my-imaginary-file' istream = rw_bare_repo.odb.store( - IStream(Blob.type, filesize, fileobj)) + IStream(Blob.type, filesize, fileobj)) entry = BaseIndexEntry((100644, istream.binsha, 0, filename)) try: rw_bare_repo.index.add([entry]) @@ -693,5 +698,3 @@ class TestIndex(TestBase): except Exception, e: asserted = "does not have a working tree" in e.message assert asserted, "Adding using a filename is not correctly asserted." - - |