From 56823868efddd3bdbc0b624cdc79adc3a2e94a75 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 20 Oct 2009 21:32:00 +0200 Subject: Improved tuple access of EntryIndex class including test, stage and type access still needs to be decoded though --- test/git/test_index.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/git') 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") -- cgit v1.2.3