diff options
author | Antoine Musso <hashar@free.fr> | 2014-11-16 20:56:53 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2014-11-16 21:05:53 +0100 |
commit | 614907b7445e2ed8584c1c37df7e466e3b56170f (patch) | |
tree | 4b6e09110cd356799e9fa0f188fae55e5fa81fca /git/test/test_tree.py | |
parent | be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (diff) | |
download | gitpython-614907b7445e2ed8584c1c37df7e466e3b56170f.tar.gz |
pep8 linting (whitespace before/after)
E201 whitespace after '('
E202 whitespace before ')'
E203 whitespace before ':'
E225 missing whitespace around operator
E226 missing whitespace around arithmetic operator
E227 missing whitespace around bitwise or shift operator
E228 missing whitespace around modulo operator
E231 missing whitespace after ','
E241 multiple spaces after ','
E251 unexpected spaces around keyword / parameter equals
Diffstat (limited to 'git/test/test_tree.py')
-rw-r--r-- | git/test/test_tree.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/git/test/test_tree.py b/git/test/test_tree.py index 7edae577..e3743c2d 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -59,7 +59,7 @@ class TestTree(TestBase): assert len(testtree) == cur_count # fails with a different sha - name exists - hexsha = "1"*40 + hexsha = "1" * 40 self.failUnlessRaises(ValueError, mod.add, hexsha, tree.mode, name) # force it - replace existing one @@ -113,18 +113,18 @@ class TestTree(TestBase): assert len(list(root)) == len(list(root.traverse(depth=1))) # only choose trees - trees_only = lambda i,d: i.type == "tree" - trees = list(root.traverse(predicate = trees_only)) - assert len(trees) == len(list( i for i in root.traverse() if trees_only(i,0) )) + trees_only = lambda i, d: i.type == "tree" + trees = list(root.traverse(predicate=trees_only)) + assert len(trees) == len(list(i for i in root.traverse() if trees_only(i, 0))) # test prune - lib_folder = lambda t,d: t.path == "lib" - pruned_trees = list(root.traverse(predicate = trees_only,prune = lib_folder)) + lib_folder = lambda t, d: t.path == "lib" + pruned_trees = list(root.traverse(predicate=trees_only, prune=lib_folder)) assert len(pruned_trees) < len(trees) # trees and blobs - assert len(set(trees)|set(root.trees)) == len(trees) - assert len(set(b for b in root if isinstance(b, Blob)) | set(root.blobs)) == len( root.blobs ) + assert len(set(trees) | set(root.trees)) == len(trees) + assert len(set(b for b in root if isinstance(b, Blob)) | set(root.blobs)) == len(root.blobs) subitem = trees[0][0] assert "/" in subitem.path assert subitem.name == os.path.basename(subitem.path) @@ -138,6 +138,6 @@ class TestTree(TestBase): # END check for slash # slashes in paths are supported as well - assert root[item.path] == item == root/item.path + assert root[item.path] == item == root / item.path # END for each item assert found_slash |