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

Function test_step_export_unit_default

tests/test_exporters.py:980–992  ·  view source on GitHub ↗

Exports a box without specifying a unit and verifies the STEP file header defaults to millimeters.

(tmpdir)

Source from the content-addressed store, hash-verified

978
979
980def test_step_export_unit_default(tmpdir):
981 """
982 Exports a box without specifying a unit and verifies the STEP file
983 header defaults to millimeters.
984 """
985
986 box_path = os.path.join(tmpdir, "unit_default.step")
987 Workplane().box(1, 1, 1).val().exportStep(box_path)
988
989 with open(box_path, "r") as f:
990 content = f.read()
991
992 assert "MILLI" in content
993
994
995def test_step_export_unit_inches(tmpdir):

Callers

nothing calls this directly

Calls 4

WorkplaneClass · 0.90
exportStepMethod · 0.80
boxMethod · 0.80
valMethod · 0.45

Tested by

no test coverage detected