Fix Python path issue in coverage script

- Add current directory to Python path before calling django.setup()
- This fixes ModuleNotFoundError: No module named 'ivatar'
- The script now properly finds the ivatar module when running tests
- Coverage should now work correctly with Django test runner
This commit is contained in:
Oliver Falk
2025-10-16 19:59:25 +02:00
parent e6596b925a
commit b95bf287bf

View File

@@ -22,6 +22,9 @@ def main():
print("Running tests with OpenTelemetry enabled...")
print("==========================================")
# Add current directory to Python path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Setup Django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ivatar.settings")
django.setup()