smbinterp/test/qhull.test.py
Stephen Mardson McQuay 98b13fb8c5 merged the drivers, and am investigating the qdelauney manpage ... should've done this earlier :P
--HG--
rename : bin/driver-random.py => bin/driver.py
rename : test/utest.py => test/qhull.test.py
2010-01-30 12:15:00 -07:00

30 lines
685 B
Python
Executable File

#!/usr/bin/python
import random
import unittest
import delaunay
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.l = [[-1, 1], [-1, 0], [-1, 1], [0, -1], [0, 0], [0, 1], [1, -1], [1, 0], [1, 1]]
def testQhull(self):
dt = delaunay.Triangulation(self.l)
answer = [
[4,1,3],
[1,5,0],
[5,1,4],
[7,3,6],
[7,4,3],
[7,5,4],
[5,7,8],
]
self.assertEqual(dt.indices, answer)
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(TestSequenceFunctions)
unittest.TextTestRunner(verbosity=5).run(suite)