Fix Python API tests (#8392)
authorAndres Noetzli <andres.noetzli@gmail.com>
Fri, 25 Mar 2022 13:08:01 +0000 (06:08 -0700)
committerGitHub <noreply@github.com>
Fri, 25 Mar 2022 13:08:01 +0000 (08:08 -0500)
Note that we are currently not running API tests on the CI due to the
changes in 23dd064.

test/unit/api/python/test_solver.py

index 6329c10111969e0ce87ac1fb43c3fef96b232dc5..6f18d96b4bd419caa7223fc02e43bf3538759837 100644 (file)
@@ -2468,6 +2468,7 @@ def test_issue7000(solver):
 
 
 def test_mk_sygus_var(solver):
+    solver.setOption("sygus", "true")
     boolSort = solver.getBooleanSort()
     intSort = solver.getIntegerSort()
     funSort = solver.mkFunctionSort(intSort, boolSort)
@@ -2515,7 +2516,7 @@ def test_synth_fun(solver):
     with pytest.raises(RuntimeError):
         solver.synthFun("f6", [x], boolean, g2)
     slv = cvc5.Solver()
-    solver.setOption("sygus", "true")
+    slv.setOption("sygus", "true")
     x2 = slv.mkVar(slv.getBooleanSort())
     slv.synthFun("f1", [x2], slv.getBooleanSort())
     with pytest.raises(RuntimeError):