Commit d07d3091 authored by Dario Seyb's avatar Dario Seyb

added simple test

parent 8715c82f
......@@ -17,7 +17,5 @@ setup(name='meshvis',
'numpy',
'pythreejs'
],
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,
zip_safe=False)
import unittest
import meshvis
class IndexedAttributes(unittest.TestCase):
quad_verts = [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]]
quad_faces = [[0, 1, 2], [0, 2, 3]]
def point_attribute(self):
attrib = meshvis.PointAttribute(['a', 'b', 'c, ''d'])
resolved_attrib = meshvis.resolve_attributes(self.quad_faces, [attrib])
self.assertEqual(len(resolved_attrib), 6)
self.assertListEqual(resolved_attrib, ['a', 'b', 'c', 'a', 'c', 'd'])
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(IndexedAttributes)
unittest.TextTestRunner(verbosity=2).run(suite)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment