Skip to content

Fix test_alembic exception handler with diagnostic message#34

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-issue
Open

Fix test_alembic exception handler with diagnostic message#34
Copilot wants to merge 2 commits intomainfrom
copilot/fix-issue

Conversation

Copy link

Copilot AI commented Jan 26, 2026

Issue

test_alembic() in backend/tests/samples/test_db.py had a bare assert False in the exception handler, providing no diagnostic information on failure.

Changes

Added exception details to the assertion message:

def test_alembic():
    """Test if the alembic has properly initialized tables"""
    db = next(get_db())
    try:
        db.query(models.Algoritme).all()
    except Exception as e:
-       assert False
+       assert False, f"Failed to query Algoritme model. Alembic may not have initialized tables properly: {e}"

The test now reports the underlying exception when database initialization fails.

Original prompt

Fix


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: eternograf <197654566+eternograf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unspecified issue in the project Fix test_alembic exception handler with diagnostic message Jan 26, 2026
Copilot AI requested a review from eternograf January 26, 2026 05:35
@eternograf eternograf marked this pull request as ready for review January 26, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants