def test_step_write_modified_tolerance(self): step_handler = StepHandler() mesh_points = step_handler.parse('tests/test_datasets/test_pipe.step') outfilename = 'tests/test_datasets/test_pipe_out.step' step_handler.write(mesh_points, outfilename, 1e-3) self.assertEqual(step_handler.outfile, outfilename) self.addCleanup(os.remove, outfilename)
def test_step_write_failing_infile_instantiation(self): step_handler = StepHandler() mesh_points = np.zeros((20, 3)) with self.assertRaises(RuntimeError): step_handler.write(mesh_points, 'tests/test_datasets/test_pipe_out.step')
def test_step_write_failing_check_extension(self): step_handler = StepHandler() mesh_points = step_handler.parse('tests/test_datasets/test_pipe.step') with self.assertRaises(ValueError): step_handler.write(mesh_points, 'tests/test_datasets/test_square.stl')
def test_step_write_failing_filename_type(self): step_handler = StepHandler() mesh_points = step_handler.parse('tests/test_datasets/test_pipe.step') with self.assertRaises(TypeError): step_handler.write(mesh_points, -2)