idea119-regflow-verifiable-pre/tests/regflow.py

15 lines
608 B
Python

"""Lightweight shim to expose regflow API for pytest when repo root isn't on sys.path.
This imports the real implementation from the repository's regflow package.
"""
import importlib.util
import os
_repo_init = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'regflow', '__init__.py'))
_spec = importlib.util.spec_from_file_location('regflow_impl', _repo_init)
_mod = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(_mod) # type: ignore
# Re-export the functions under the regflow namespace for tests
compile_dsl = _mod.compile_dsl
generate_proof = _mod.generate_proof