summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-01 13:19:57 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-01 13:19:57 +0200
commit4298468f68876683afd17d50c75ac9ea6ae2ed16 (patch)
treecbe4f01f1735ee7644d82a03d79dd252cbbe3c92
parent6f960586feccff8c1f2c717765eb0a5e8b9cd6f3 (diff)
downloadgitpython-4298468f68876683afd17d50c75ac9ea6ae2ed16.tar.gz
Fixed ref-log related issue in the test suite to assure it will not give false positives in repositories that are freshly checked out
-rw-r--r--git/test/db/base.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/git/test/db/base.py b/git/test/db/base.py
index b0bc76f9..5291ba03 100644
--- a/git/test/db/base.py
+++ b/git/test/db/base.py
@@ -584,8 +584,15 @@ class RepoBase(TestDBBase):
assert rev_parse(refspec+":CHANGES").type == 'blob'
#END operate on non-detached head
- # the last position
- assert rev_parse('@{1}') != head.commit
+ # the most recent previous position of the currently checked out branch
+
+ try:
+ assert rev_parse('@{1}') != head.commit
+ except IndexError:
+ # on new checkouts, there isn't even a single past branch position
+ # in the log
+ pass
+ #END handle fresh checkouts
# position doesn't exist
self.failUnlessRaises(IndexError, rev_parse, '@{10000}')