smbinterp/test/qhull.py
Stephen Mardson McQuay 6bfaa20d40 renamed test files
--HG--
rename : test/cubic.test.py => test/2dcubic.py
rename : test/quad.test.py => test/2dquadratic.py
rename : test/baker.test.py => test/baker2d.py
rename : test/baker.order.test.py => test/baker2dorder.py
rename : test/baker3D.test.py => test/baker3d.py
rename : test/qhull.test.py => test/qhull.py
2011-02-03 09:38:44 -07:00

28 lines
678 B
Python
Executable File

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