MCPcopy Create free account
hub / github.com/Rhoban/placo / test_problem_overconstrained

Method test_problem_overconstrained

python/tests/problem_test.py:247–259  ·  view source on GitHub ↗

Checking that overconstrained equalities solve raise an exception

(self)

Source from the content-addressed store, hash-verified

245 )
246
247 def test_problem_overconstrained(self):
248 """
249 Checking that overconstrained equalities solve raise an exception
250 """
251 problem = placo.Problem()
252
253 x = problem.add_variable(1)
254 y = problem.add_variable(1)
255
256 problem.add_constraint(x.expr() + y.expr() == 1.0)
257 problem.add_constraint(x.expr() + y.expr() == 2.0)
258
259 self.assertRaises(RuntimeError, problem.solve)
260
261 def test_expr_t(self):
262 """

Callers

nothing calls this directly

Calls 3

ProblemMethod · 0.80
add_constraintMethod · 0.45
exprMethod · 0.45

Tested by

no test coverage detected