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

Function test_each

tests/test_sketch.py:307–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305
306
307def test_each():
308
309 s1 = Sketch().each(lambda l: Sketch().push([l]).rect(1, 1))
310
311 assert len(s1._faces.Faces()) == 1
312
313 s2 = (
314 Sketch()
315 .push([(0, 0), (2, 2)])
316 .each(lambda l: Sketch().push([l]).rect(1, 1), ignore_selection=True)
317 )
318
319 assert len(s2._faces.Faces()) == 1
320
321
322def test_modifiers():

Callers

nothing calls this directly

Calls 5

SketchClass · 0.90
pushMethod · 0.80
eachMethod · 0.45
rectMethod · 0.45
FacesMethod · 0.45

Tested by

no test coverage detected