@@ -135,7 +135,7 @@ def _cmp_tree_index(self, tree, index):
135135 raise AssertionError ("CMP Failed: Missing entries in index: %s, missing in tree: %s" %
136136 (bset - iset , iset - bset ))
137137 # END assertion message
138-
138+
139139 @with_rw_repo ('0.1.6' )
140140 def test_index_lock_handling (self , rw_repo ):
141141 def add_bad_blob ():
@@ -147,7 +147,8 @@ def add_bad_blob():
147147 except Exception as ex :
148148 msg_py3 = "required argument is not an integer"
149149 msg_py2 = "cannot convert argument to integer"
150- assert msg_py2 in str (ex ) or msg_py3 in str (ex )
150+ ## msg_py26 ="unsupported operand type(s) for &: 'str' and 'long'"
151+ assert msg_py2 in str (ex ) or msg_py3 in str (ex ), str (ex )
151152
152153 ## 2nd time should not fail due to stray lock file
153154 try :
@@ -157,6 +158,9 @@ def add_bad_blob():
157158
158159 @with_rw_repo ('0.1.6' )
159160 def test_index_file_from_tree (self , rw_repo ):
161+ if sys .version_info < (2 , 7 ):
162+ ## Skipped, not `assertRaisesRegexp` in py2.6
163+ return
160164 common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541"
161165 cur_sha = "4b43ca7ff72d5f535134241e7c797ddc9c7a3573"
162166 other_sha = "39f85c4358b7346fee22169da9cad93901ea9eb9"
@@ -576,7 +580,7 @@ def mixed_iterator():
576580 if sys .platform != "win32" :
577581 for target in ('/etc/nonexisting' , '/etc/passwd' , '/etc' ):
578582 basename = "my_real_symlink"
579-
583+
580584 link_file = os .path .join (rw_repo .working_tree_dir , basename )
581585 os .symlink (target , link_file )
582586 entries = index .reset (new_commit ).add ([link_file ], fprogress = self ._fprogress_add )
0 commit comments