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

Method test_solver_assertions

tests/test_z3_ported.py:882–888  ·  view source on GitHub ↗

Guide: solver.assertions() returns added constraints.

(self, kernel)

Source from the content-addressed store, hash-verified

880 assert s.check() != unsat
881
882 def test_solver_assertions(self, kernel):
883 """Guide: solver.assertions() returns added constraints."""
884 s = Solver()
885 x = Int("x")
886 s.add(x > 0)
887 s.add(x < 10)
888 assert len(s.assertions()) == 2
889
890 def test_solver_reset(self, kernel):
891 """Guide: solver.reset() clears all."""

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
assertionsMethod · 0.95
SolverClass · 0.90
IntFunction · 0.90

Tested by

no test coverage detected