panda3d/tests/pgraph/test_shaderinput.py
rdb cef70a4fe5 tests: remove __gt__ asserts from test_shaderinput_vector_compare
This fails in Python 2, and we don't actually provide this operator or make any guarantees about greater-than ordering, so it was silly to test for it to begin with.
2020-01-04 01:21:54 +01:00

33 lines
676 B
Python

from panda3d.core import ShaderInput, Vec4
def test_shaderinput_vector_compare():
i0 = ShaderInput('a', Vec4(0, 0, 0, 0))
i1 = ShaderInput('a', Vec4(1e-9, 0, 0, 0))
i2 = ShaderInput('a', Vec4(1e-8, 0, 0, 0))
i3 = ShaderInput('a', Vec4(2, 0, 0, 0))
assert i0 == i0
assert i1 == i1
assert i2 == i2
assert i3 == i3
assert i0 != i1
assert i0 != i2
assert i0 != i3
assert i1 != i2
assert i2 != i3
assert i1 != i3
assert not i0 < i0
assert not i1 < i1
assert not i2 < i2
assert not i3 < i3
assert i0 < i1
assert i0 < i2
assert i0 < i3
assert i1 < i2
assert i2 < i3
assert i1 < i3