MCPcopy Index your code
hub / github.com/CadQuery/cadquery / test_assy_root_name

Function test_assy_root_name

tests/test_assembly.py:693–702  ·  view source on GitHub ↗
(assy_fixture, root_name, request)

Source from the content-addressed store, hash-verified

691 "assy_fixture, root_name", [("simple_assy", None), ("nested_assy", "TOP")],
692)
693def test_assy_root_name(assy_fixture, root_name, request):
694 assy = request.getfixturevalue(assy_fixture)
695 _, doc = toCAF(assy, True)
696 root = get_doc_nodes(doc, False)[0]
697 if root_name:
698 assert root["name"] == root_name
699 else:
700 # When a name is not user-specifed, the name is assigned a UUID
701 m = re.findall(r"[0-9a-f]+", root["name"])
702 assert list(map(len, m)) == [8, 4, 4, 4, 12]
703
704
705def test_step_export(nested_assy, tmpdir):

Callers

nothing calls this directly

Calls 2

toCAFFunction · 0.90
get_doc_nodesFunction · 0.85

Tested by

no test coverage detected