| 557 | |
| 558 | |
| 559 | def 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 | |
| 576 | def test_constraint_solver(): |