Permalink
Browse files

Added unit test for Numpy data types if numpy's installed

  • Loading branch information...
1 parent 8b39500 commit 3a8236fa08eb1f5d7a5fe56c5ecc727c9f2ab05c Evan Jones committed Dec 3, 2017
Showing with 10 additions and 1 deletion.
  1. +10 −1 solid/test/test_solidpython.py
@@ -266,7 +266,16 @@ def test_scad_render_to_file(self):
# TODO: test include_orig_code=True, but that would have to
# be done from a separate file, or include everything in this one
-
+ def test_numpy_type(self):
+ try:
+ import numpy
+ numpy_cube = cube(size=numpy.array([1,2,3]))
+ expected ='\n\ncube(size = [1,2,3]);'
+ actual = scad_render(numpy_cube)
+ self.assertEqual(expected, actual, 'Numpy SolidPython not rendered correctly')
+ except ImportError:
+ pass
+
def single_test(test_dict):
name, args, kwargs, expected = test_dict['name'], test_dict['args'], test_dict['kwargs'], test_dict['expected']

0 comments on commit 3a8236f

Please sign in to comment.