summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-20 21:32:00 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-20 21:32:00 +0200
commit56823868efddd3bdbc0b624cdc79adc3a2e94a75 (patch)
tree1e6557b39a4d5c00fbb388e348e03a3a57b8c2bf /test/git/test_index.py
parent50a9920b1bd9e6e8cf452c774c499b0b9014ccef (diff)
downloadgitpython-56823868efddd3bdbc0b624cdc79adc3a2e94a75.tar.gz
Improved tuple access of EntryIndex class including test, stage and type access still needs to be decoded though
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 272e68b3..91ce22fd 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -6,6 +6,7 @@
from test.testlib import *
from git import *
+import inspect
class TestTree(TestCase):
@@ -14,6 +15,19 @@ class TestTree(TestCase):
cls.repo = Repo(GIT_REPO)
def test_base(self):
+ # read from file
index = Index.from_file(fixture_path("index"))
assert index.entries
assert index.version > 0
+
+ # test entry
+ last_val = None
+ entry = index.entries.itervalues().next()
+ for name, method in inspect.getmembers(entry,inspect.ismethod):
+ val = method(entry)
+ assert val != last_val
+ last_val = val
+ # END for each method
+
+ # write
+ self.fail("writing, object type and stage")