diff options
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py index 178a59d2..2ea787a4 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -135,7 +135,7 @@ class TestIndex(TestBase): raise AssertionError("CMP Failed: Missing entries in index: %s, missing in tree: %s" % (bset - iset, iset - bset)) # END assertion message - + @with_rw_repo('0.1.6') def test_index_lock_handling(self, rw_repo): def add_bad_blob(): @@ -147,7 +147,8 @@ class TestIndex(TestBase): except Exception as ex: msg_py3 = "required argument is not an integer" msg_py2 = "cannot convert argument to integer" - assert msg_py2 in str(ex) or msg_py3 in str(ex) + ## msg_py26 ="unsupported operand type(s) for &: 'str' and 'long'" + assert msg_py2 in str(ex) or msg_py3 in str(ex), str(ex) ## 2nd time should not fail due to stray lock file try: @@ -157,6 +158,9 @@ class TestIndex(TestBase): @with_rw_repo('0.1.6') def test_index_file_from_tree(self, rw_repo): + if sys.version_info < (2, 7): + ## Skipped, not `assertRaisesRegexp` in py2.6 + return common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541" cur_sha = "4b43ca7ff72d5f535134241e7c797ddc9c7a3573" other_sha = "39f85c4358b7346fee22169da9cad93901ea9eb9" @@ -576,7 +580,7 @@ class TestIndex(TestBase): if sys.platform != "win32": for target in ('/etc/nonexisting', '/etc/passwd', '/etc'): basename = "my_real_symlink" - + link_file = os.path.join(rw_repo.working_tree_dir, basename) os.symlink(target, link_file) entries = index.reset(new_commit).add([link_file], fprogress=self._fprogress_add) |