Exports a meta STEP file with unit="M" and verifies the header declares meters.
(tmp_path_factory)
| 960 | |
| 961 | |
| 962 | def test_step_export_meta_unit_meters(tmp_path_factory): |
| 963 | """ |
| 964 | Exports a meta STEP file with unit="M" and verifies the header |
| 965 | declares meters. |
| 966 | """ |
| 967 | |
| 968 | tmpdir = tmp_path_factory.mktemp("unit_meta_m") |
| 969 | m_path = os.path.join(tmpdir, "meta_unit_meters.step") |
| 970 | |
| 971 | assy = cq.Assembly() |
| 972 | assy.add(cq.Workplane().box(1, 1, 1), name="box") |
| 973 | exportStepMeta(assy, m_path, unit="M") |
| 974 | |
| 975 | with open(m_path, "r") as f: |
| 976 | content = f.read() |
| 977 | |
| 978 | assert "MILLI" not in content |
| 979 | assert "METRE" in content |
| 980 | |
| 981 | |
| 982 | def test_step_export_assembly_output_unit(tmp_path_factory): |
nothing calls this directly
no test coverage detected