pyo3/examples/sequential/tests/test_.py

22 lines
337 B
Python
Raw Normal View History

2023-10-12 14:44:05 +00:00
import pytest
from sequential import Id
def test_make_some():
for x in range(12):
i = Id()
assert x == int(i)
def test_args():
with pytest.raises(TypeError, match="Id\\(\\) takes no arguments"):
Id(3, 4)
def test_cmp():
a = Id()
b = Id()
assert a <= b
assert a < b
assert a == a