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

Function test_constraint_validation

tests/test_sketch.py:559–573  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

557
558
559def test_constraint_validation():
560
561 with raises(ValueError):
562 Sketch().segment(1.0, 1.0, "s").constrain("s", "Dummy", None)
563
564 with raises(ValueError):
565 Sketch().segment(1.0, 1.0, "s").constrain("s", "s", "Fixed", None)
566
567 with raises(ValueError):
568 Sketch().spline([(1.0, 1.0), (2.0, 1.0), (0.0, 0.0)], "s").constrain(
569 "s", "Fixed", None
570 )
571
572 with raises(ValueError):
573 Sketch().segment(1.0, 1.0, "s").constrain("s", "Fixed", 1)
574
575
576def test_constraint_solver():

Callers

nothing calls this directly

Calls 4

SketchClass · 0.90
segmentMethod · 0.80
constrainMethod · 0.45
splineMethod · 0.45

Tested by

no test coverage detected