Cosplay/nhf/test.py

28 lines
708 B
Python

import unittest
import cadquery as Cq
import nhf.joints
import nhf.handle
class TestJoints(unittest.TestCase):
def test_joint_hirth(self):
j = nhf.joints.hirth_joint()
self.assertIsInstance(
j.val().solids(), Cq.Solid,
msg="Hirth joint must be in one piece")
def test_joints_hirth_assembly(self):
nhf.joints.hirth_assembly()
def test_joints_comma_assembly(self):
nhf.joints.comma_assembly()
class TestHandle(unittest.TestCase):
def test_handle_assembly(self):
h = nhf.handle.Handle()
h.connector_insertion_assembly()
h.connector_one_side_insertion_assembly()
if __name__ == '__main__':
unittest.main()