MCPcopy
hub / github.com/CadQuery/cadquery / test_assembly

Function test_assembly

tests/test_assembly.py:671–687  ·  view source on GitHub ↗
(simple_assy, nested_assy)

Source from the content-addressed store, hash-verified

669
670
671def test_assembly(simple_assy, nested_assy):
672
673 # basic checks
674 assert len(simple_assy.objects) == 3
675 assert len(simple_assy.children) == 2
676 assert len(simple_assy.shapes) == 1
677
678 assert len(nested_assy.objects) == 3
679 assert len(nested_assy.children) == 1
680 assert nested_assy.objects["SECOND"].parent is nested_assy
681
682 # bottom-up traversal
683 kvs = list(nested_assy.traverse())
684
685 assert kvs[0][0] == "BOTTOM"
686 assert len(kvs[0][1].shapes[0].Solids()) == 2
687 assert kvs[-1][0] == "TOP"
688
689
690@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

SolidsMethod · 0.80
traverseMethod · 0.45

Tested by

no test coverage detected