import unittest import cadquery as Cq from nhf.build import Model, target class BuildScaffold(Model): @target(name="obj1") def o1(self): return Cq.Solid.makeBox(10, 10, 10) def o2(self): return Cq.Solid.makeCylinder(10, 20) class TestBuild(unittest.TestCase): def test_build_scaffold(self): s = BuildScaffold() names = ["obj1"] self.assertEqual(s.target_names, names) self.assertEqual(s.check_all(), len(names)) if __name__ == '__main__': unittest.main()