mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-18 14:08:04 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user