diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-12-08 13:20:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-08 13:20:52 +0100 |
commit | 2f207e0e15ad243dd24eafce8b60ed2c77d6e725 (patch) | |
tree | 9460e9e1178c21389386e49e336550093d34448b /git/test/test_index.py | |
parent | a8437c014b0a9872168b01790f5423e8e9255840 (diff) | |
parent | f3d5df2ce3addd9e9e1863f4f33665a16b415b71 (diff) | |
download | gitpython-2f207e0e15ad243dd24eafce8b60ed2c77d6e725.tar.gz |
Merge pull request #541 from andy-maier/py26_fixes
Fixes to support Python 2.6 again.
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 1abe22f4..071ac623 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -13,7 +13,10 @@ from stat import ( ) import sys import tempfile -from unittest.case import skipIf +try: + from unittest import skipIf +except ImportError: + from unittest2 import skipIf from git import ( IndexFile, @@ -149,8 +152,9 @@ class TestIndex(TestBase): except Exception as ex: msg_py3 = "required argument is not an integer" msg_py2 = "cannot convert argument to integer" - ## msg_py26 ="unsupported operand type(s) for &: 'str' and 'long'" - assert msg_py2 in str(ex) or msg_py3 in str(ex), str(ex) + msg_py26 = "unsupported operand type(s) for &: 'str' and 'long'" + assert msg_py2 in str(ex) or msg_py3 in str(ex) or \ + msg_py26 in str(ex), str(ex) ## 2nd time should not fail due to stray lock file try: |