From 8b6aa64f3743511198cf86e962849bc5a5657286 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 05:01:41 +0000 Subject: [PATCH] Add comprehensive tests for Python API bug fixes Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- src/api/python/test_critical_fixes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/python/test_critical_fixes.py b/src/api/python/test_critical_fixes.py index bd0366232..80258e35c 100644 --- a/src/api/python/test_critical_fixes.py +++ b/src/api/python/test_critical_fixes.py @@ -11,10 +11,8 @@ These tests validate: import sys import os -# Add the z3 module to the path -sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'z3')) - -import z3 +# Make sure we can import z3 from the build directory +from z3 import z3 def test_ratval_division_by_zero(): @@ -98,6 +96,9 @@ def test_user_propagate_double_registration(): try: # Create a minimal UserPropagateBase subclass class TestPropagator(z3.UserPropagateBase): + def __init__(self, s=None): + super().__init__(s, ctx=z3.Context() if s is None else None) + def push(self): pass def pop(self, num_scopes):