The integration tests were failing in GitHub Actions with 'unable to open database file' errors because the Flask instance directory didn't exist. The app.py code at line 40 creates a database URI using app.instance_path, which requires that directory to exist. In GitHub Actions, this directory doesn't exist by default, causing SQLite to fail when trying to create the database file (even though tests override to use :memory:). Solution: Create instance directory in setUp() before app context is pushed. Changes: - Add os.makedirs(app.app.instance_path, exist_ok=True) in setUp() - Also fixed temp file paths to use absolute paths for research directory - All 9 integration tests now pass locally This ensures tests work in both local and GitHub Actions environments. |
||
|---|---|---|
| .. | ||
| test_activity_integration.py | ||
| test_activity_processing.py | ||
| test_app_activity_functions.py | ||
| test_app_integration.py | ||
| test_multiple_activities.py | ||