Exports an assembly with unit="M" and verifies the STEP file header declares meters.
(tmp_path_factory)
| 940 | |
| 941 | |
| 942 | def test_step_export_assembly_unit_meters(tmp_path_factory): |
| 943 | """ |
| 944 | Exports an assembly with unit="M" and verifies the STEP file header |
| 945 | declares meters. |
| 946 | """ |
| 947 | |
| 948 | tmpdir = tmp_path_factory.mktemp("unit_assy_m") |
| 949 | m_path = os.path.join(tmpdir, "assy_unit_meters.step") |
| 950 | |
| 951 | assy = cq.Assembly() |
| 952 | assy.add(cq.Workplane().box(1, 1, 1), name="box") |
| 953 | exportAssembly(assy, m_path, unit="M") |
| 954 | |
| 955 | with open(m_path, "r") as f: |
| 956 | content = f.read() |
| 957 | |
| 958 | assert "MILLI" not in content |
| 959 | assert "METRE" in content |
| 960 | |
| 961 | |
| 962 | def test_step_export_meta_unit_meters(tmp_path_factory): |
nothing calls this directly
no test coverage detected