summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-05-11 11:01:45 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-05-12 15:56:50 +0200
commit600fcbc1a2d723f8d51e5f5ab6d9e4c389010e1c (patch)
tree2be1a6f54390e18bc7b6c2318eae23e700c96df6 /test/git/test_index.py
parent8caeec1b15645fa53ec5ddc6e990e7030ffb7c5a (diff)
downloadgitpython-600fcbc1a2d723f8d51e5f5ab6d9e4c389010e1c.tar.gz
Repo: Added comparison operators and hash operator including test
Cmd: AutoInterrupt handles boundary cases more gracefully as it can be that the os module suddenly becomes None if the interpreter is going down
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 95f2b519..f0f5f115 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -147,6 +147,10 @@ class TestIndex(TestBase):
@with_rw_repo('0.1.6')
def test_index_merge_tree(self, rw_repo):
+ # A bit out of place, but we need a different repo for this:
+ assert self.rorepo != rw_repo and not (self.rorepo == rw_repo)
+ assert len(set((self.rorepo, self.rorepo, rw_repo, rw_repo))) == 2
+
# SINGLE TREE MERGE
# current index is at the (virtual) cur_commit
next_commit = "4c39f9da792792d4e73fc3a5effde66576ae128c"
@@ -546,10 +550,10 @@ class TestIndex(TestBase):
yield index.entries[index.get_entries_key('.gitignore', 0)]
for fid in range(3):
- fname = 'newfile%i' % fid
- open(fname, 'wb').write("abcd")
- yield Blob(rw_repo, Blob.NULL_HEX_SHA, 0100644, fname)
- # END for each new file
+ fname = 'newfile%i' % fid
+ open(fname, 'wb').write("abcd")
+ yield Blob(rw_repo, Blob.NULL_HEX_SHA, 0100644, fname)
+ # END for each new file
# END path producer
paths = list(make_paths())
index.add(paths, path_rewriter=rewriter)