mirror of
https://github.com/cortesi/scurve.git
synced 2025-06-19 09:15:33 -04:00
20 lines
449 B
Python
20 lines
449 B
Python
from scurve import hcurve
|
|
|
|
|
|
class TestHcurve:
|
|
def test_xycor(self):
|
|
n = 4
|
|
h = hcurve.Hcurve(2, n)
|
|
for i in range(n*n):
|
|
assert h.xcor(i, n) < n
|
|
assert h.ycor(i, n) < n
|
|
|
|
def test_fromSize(self):
|
|
h = hcurve.Hcurve.fromSize(2, 16)
|
|
assert h.size == 4
|
|
assert len(h) == 16
|
|
|
|
def test_traversal(self):
|
|
h = hcurve.Hcurve.fromSize(2, 16)
|
|
assert [i for i in h]
|