Skip to content

TEST: Restore index attachment test. - #115

Open
aminemanai2003 wants to merge 1 commit into
casact:mainfrom
aminemanai2003:test/restore-add-indexes
Open

TEST: Restore index attachment test.#115
aminemanai2003 wants to merge 1 commit into
casact:mainfrom
aminemanai2003:test/restore-add-indexes

Conversation

@aminemanai2003

@aminemanai2003 aminemanai2003 commented Aug 6, 2026

Copy link
Copy Markdown

Restores test_add_indexes using the indexes generated in the sample database.

The test now:

  • initializes ExpectedLossWidget with the matching XYZ triangle, premium data, and averaging selection;
  • opens IndexInventory, selects the first sample index, and confirms it is attached to the premium-index model;
  • closes SQLAlchemy sessions and disposes their engines after inventory reads so the copied SQLite fixture can be removed reliably.

Validation:

  • uv run --extra test python faslr/samples/db/generate_sample_db.py
  • QT_QPA_PLATFORM=offscreen uv run --extra test python -m pytest faslr/tests/index/test_index.py -q — 3 passed
  • git diff --check

The complete local GUI suite could not finish headlessly because existing connection and data tests wait for native file dialogs. GitHub Actions runs the suite under Xvfb.

This implementation and test review were completed with AI assistance.

Closes #104.

@aminemanai2003 aminemanai2003 reopened this Aug 6, 2026
@aminemanai2003
aminemanai2003 marked this pull request as ready for review August 6, 2026 22:35
@aminemanai2003

Copy link
Copy Markdown
Author

Hi @genedan — I’ve restored test_add_indexes in PR #115 using the sample database fixture and reopened it for review. The focused index tests pass locally. I’d appreciate your review when you have time, and I’m happy to adjust the approach if needed.

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.

Renable test_add_indexes from test_index.py

1 participant