tests: fix syntax error on Python 3

This commit is contained in:
rdb 2017-11-06 19:42:52 +01:00
parent b73c627c61
commit dc1f5dd3b1

View File

@ -105,8 +105,9 @@ def test_seq_property_getitem():
assert prop[-3] == item_a
# Long index
assert prop[1L] == item_b
assert prop[-1L] == item_b
if sys.version_info[0] < 3:
assert prop[long(1)] == item_b
assert prop[long(-1)] == item_b
# Out of bounds access
with pytest.raises(IndexError):
@ -158,10 +159,11 @@ def test_seq_property_setitem():
assert tuple(prop) == (item_c, item_b, item_a)
# Long index
prop[1L] = item_b
assert prop[1] == item_b
prop[-1L] = item_b
assert prop[-1] == item_b
if sys.version_info[0] < 3:
prop[long(1)] = item_b
assert prop[1] == item_b
prop[long(-1)] = item_b
assert prop[-1] == item_b
# Out of bounds access
with pytest.raises(IndexError):