smbinterp/test/qhull.py
Stephen Mardson McQuay 9827035e72 made it so I can call all tests at once
--HG--
rename : test/2dcubic.py => test/cubic2d.py
rename : test/2dquadratic.py => test/quadratic2d.py
2011-02-15 11:27:45 -07:00

28 lines
644 B
Python

#!/usr/bin/env python
import unittest
class Test(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):
import delaunay
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(Test)
unittest.TextTestRunner(verbosity=5).run(suite)