summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
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")