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

Function test_bin_import_export

tests/test_shapes.py:242–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240
241
242def test_bin_import_export():
243
244 b = box(1, 1, 1)
245
246 from io import BytesIO
247
248 bio = BytesIO()
249
250 b.exportBin(bio)
251 bio.seek(0)
252
253 r = Shape.importBin(bio)
254
255 assert r.isValid()
256 assert r.Volume() == approx(1)
257
258 with raises(Exception):
259 Shape.importBin(BytesIO())
260
261
262def test_sample():

Callers

nothing calls this directly

Calls 5

boxFunction · 0.90
exportBinMethod · 0.80
importBinMethod · 0.80
isValidMethod · 0.80
VolumeMethod · 0.80

Tested by

no test coverage detected