Repository navigation
v1.17.24 - Relative Import Fix
Bug Fixes
BUG-57: Property tests now work with relative imports
Previously, property tests (Hypothesis) would fail with "Could not import module" for any Python file using relative imports like from .helper import foo.
Root causes fixed:
- Core file detection used hardcoded
"core" in pathinstead of readingcore_pathsfrom config - Module import didn't set up proper package context for relative imports
Before:
{
"property_tests": {
"errors": ["Could not import module: /path/to/my_package/main.py"]
}
}After:
{
"property_tests": {
"status": "passed",
"functions_tested": 2
}
}Config now works correctly:
[tool.invar.guard]
core_paths = ["my_package"] # Now respected by CrossHair and property tests