コード例 #1
0
 def test_nurbs_check_infile_instantiation_correct(self):
     nurbs_handler = NurbsHandler()
     nurbs_handler.shape = True
     nurbs_handler.infile = "something"
     try:
         nurbs_handler._check_infile_instantiation()
     except RuntimeError:
         self.fail(
             "Handler was instantiated correctly, yet an error was raised.")
コード例 #2
0
 def test_nurbs_default_infile_member(self):
     nurbs_handler = NurbsHandler()
     self.assertIsNone(nurbs_handler.infile)
コード例 #3
0
 def test_nurbs_instantiation(self):
     nurbs_handler = NurbsHandler()
コード例 #4
0
 def test_nurbs_check_infile_instantiation_no_infile(self):
     nurbs_handler = NurbsHandler()
     nurbs_handler.shape = True
     with self.assertRaises(RuntimeError):
         nurbs_handler._check_infile_instantiation()
コード例 #5
0
 def test_nurbs_check_infile_instantiation_shape_infile_wrong(self):
     nurbs_handler = NurbsHandler()
     with self.assertRaises(RuntimeError):
         nurbs_handler._check_infile_instantiation()
コード例 #6
0
 def test_nurbs_write_shape_to_file_raises(self):
     nurbs_handler = NurbsHandler()
     with self.assertRaises(NotImplementedError):
         nurbs_handler.write_shape_to_file(None, None)
コード例 #7
0
 def test_nurbs_check_infile_instantiation_no_shape(self):
     nurbs_handler = NurbsHandler()
     nurbs_handler.infile = "something"
     with self.assertRaises(RuntimeError):
         nurbs_handler._check_infile_instantiation()
コード例 #8
0
 def test_nurbs_load_shape_from_file_raises(self):
     nurbs_handler = NurbsHandler()
     with self.assertRaises(NotImplementedError):
         nurbs_handler.load_shape_from_file(None)
コード例 #9
0
 def test_nurbs_default_extension_member(self):
     nurbs_handler = NurbsHandler()
     self.assertListEqual(nurbs_handler.extensions, [])
コード例 #10
0
 def test_nurbs_default_tolerance(self):
     nurbs_handler = NurbsHandler()
     self.assertAlmostEqual(nurbs_handler.tolerance, 1e-6)
コード例 #11
0
 def test_nurbs_default_control_point_position_member(self):
     nurbs_handler = NurbsHandler()
     self.assertIsNone(nurbs_handler._control_point_position)
コード例 #12
0
 def test_nurbs_default_shape_member(self):
     nurbs_handler = NurbsHandler()
     self.assertIsNone(nurbs_handler.shape)