Skip to content

Commit f47ba05

Browse files
tests made backwards-compatible
1 parent f836271 commit f47ba05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/python/test_lists.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def test_clear_with_arg():
342342
assert (False)
343343
except Exception as e:
344344
assert str(type(e)) == "<class 'TypeError'>"
345-
assert str(e) == "JSArrayProxy.clear() takes no arguments (1 given)"
345+
assert str(e).__contains__('clear() takes no arguments (1 given)')
346346

347347
#copy
348348
def test_copy():
@@ -359,7 +359,7 @@ def test_copy_with_arg():
359359
assert (False)
360360
except Exception as e:
361361
assert str(type(e)) == "<class 'TypeError'>"
362-
assert str(e) == "JSArrayProxy.copy() takes no arguments (1 given)"
362+
assert str(e).__contains__('copy() takes no arguments (1 given)')
363363

364364
#append
365365
def test_append():
@@ -544,7 +544,7 @@ def test_remove_no_args():
544544
assert (False)
545545
except Exception as e:
546546
assert str(type(e)) == "<class 'TypeError'>"
547-
assert str(e) == "JSArrayProxy.remove() takes exactly one argument (0 given)"
547+
assert str(e).__contains__('remove() takes exactly one argument (0 given)')
548548

549549
def test_remove_not_found():
550550
a = pm.eval('([1,2])')
@@ -680,7 +680,7 @@ def test_reverse_too_many_args():
680680
assert (False)
681681
except Exception as e:
682682
assert str(type(e)) == "<class 'TypeError'>"
683-
assert str(e) == "JSArrayProxy.reverse() takes no arguments (1 given)"
683+
assert str(e).__contains__('reverse() takes no arguments (1 given)')
684684

685685
#sort
686686
def test_sort():

0 commit comments

Comments
 (0)