Ok, that was a stupid question. It works with all versions (in particular, with 4.15.0), but needs a patch, which is included in the repository.
On my machine the test passed after I created a new Python environment, installed the packages from requirements.txt and the required patch by
cp ./z3py_libs/*.py sql_env/lib64/python3.10/site-packages/z3/4.15.0
cp ./z3py_libs/*.py sql_env/lib/python3.10/site-packages/z3/