mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
tests: fix syntax error on Python 3
This commit is contained in:
parent
b73c627c61
commit
dc1f5dd3b1
@ -105,8 +105,9 @@ def test_seq_property_getitem():
|
|||||||
assert prop[-3] == item_a
|
assert prop[-3] == item_a
|
||||||
|
|
||||||
# Long index
|
# Long index
|
||||||
assert prop[1L] == item_b
|
if sys.version_info[0] < 3:
|
||||||
assert prop[-1L] == item_b
|
assert prop[long(1)] == item_b
|
||||||
|
assert prop[long(-1)] == item_b
|
||||||
|
|
||||||
# Out of bounds access
|
# Out of bounds access
|
||||||
with pytest.raises(IndexError):
|
with pytest.raises(IndexError):
|
||||||
@ -158,9 +159,10 @@ def test_seq_property_setitem():
|
|||||||
assert tuple(prop) == (item_c, item_b, item_a)
|
assert tuple(prop) == (item_c, item_b, item_a)
|
||||||
|
|
||||||
# Long index
|
# Long index
|
||||||
prop[1L] = item_b
|
if sys.version_info[0] < 3:
|
||||||
|
prop[long(1)] = item_b
|
||||||
assert prop[1] == item_b
|
assert prop[1] == item_b
|
||||||
prop[-1L] = item_b
|
prop[long(-1)] = item_b
|
||||||
assert prop[-1] == item_b
|
assert prop[-1] == item_b
|
||||||
|
|
||||||
# Out of bounds access
|
# Out of bounds access
|
||||||
|
Loading…
x
Reference in New Issue
Block a user