MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / test_push_pop

Method test_push_pop

tests/test_z3_compat.py:437–446  ·  view source on GitHub ↗
(self, kernel)

Source from the content-addressed store, hash-verified

435 assert s.check() == unsat
436
437 def test_push_pop(self, kernel):
438 x = Int("x")
439 s = Solver()
440 s.add(x > 0)
441 s.push()
442 s.add(x < 0)
443 assert s.check() == unsat
444 s.pop()
445 # After pop, only x > 0 remains -- not contradictory
446 assert s.check() == unknown
447
448 def test_context_manager(self, kernel):
449 x = Int("x")

Callers

nothing calls this directly

Calls 6

addMethod · 0.95
pushMethod · 0.95
checkMethod · 0.95
popMethod · 0.95
IntFunction · 0.90
SolverClass · 0.90

Tested by

no test coverage detected