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

Function test_step_export_unit_inches

tests/test_exporters.py:995–1005  ·  view source on GitHub ↗

Exports a box with unit="INCH" and verifies the STEP file header declares inches.

(tmpdir)

Source from the content-addressed store, hash-verified

993
994
995def test_step_export_unit_inches(tmpdir):
996 """
997 Exports a box with unit="INCH" and verifies the STEP file header declares inches.
998 """
999 box_path = os.path.join(tmpdir, "unit_inches.step")
1000 Workplane().box(1, 1, 1).val().exportStep(box_path, unit="INCH")
1001
1002 with open(box_path, "r") as f:
1003 content = f.read()
1004
1005 assert "INCH" in content
1006
1007
1008def test_step_export_output_unit(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