Skip to content

Commit 0de60ab

Browse files
committed
fix(test): deal with py2 and py3
It ain't pretty, but should do the job. Related to #514
1 parent d6b1a92 commit 0de60ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: git/test/test_index.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ def add_bad_blob():
145145
## 1st fail on purpose adding into index.
146146
add_bad_blob()
147147
except Exception as ex:
148-
assert "cannot convert argument to integer" in str(ex)
148+
msg_py3 = "required argument is not an integer"
149+
msg_py2 = "cannot convert argument to integer"
150+
assert msg_py2 in str(ex) or msg_py3 in str(ex)
149151

150152
## 2nd time should not fail due to stray lock file
151153
try:

0 commit comments

Comments
 (0)