Skip to content

test(gui): wait on the listing in the arrow-key tests - #26

Merged
NaNIsaac merged 2 commits into
mainfrom
fix/gui-arrow-key-waits
Oct 24, 2026
Merged

NaNIsaac merged 2 commits into
mainfrom
fix/gui-arrow-key-waits

Conversation

@NaNIsaac

Copy link
Copy Markdown
Owner

Tier: low

  • Test-only change in tests/test_gui.py: the two arrow-key tests wait on the condition with the wait_until fixture instead of a fixed 2 s poll.
  • No source change.

Refs #24. This replaces #25, which was closed when #22 was merged and its base branch deleted; the commit is the same, rebased onto main.

test_arrow_keys_move_the_preview and test_arrow_keys_do_nothing_without_a_preview_tab polled QFileSystemModel for 2 s; under full CPU load the folder was not populated in time (7 of 10 whole-file runs failed there). They now wait up to 10 s for the row count and, in the first, for the preview to move.

Load result, measured on the pre-merge head of #25 (same change): whole tests/test_gui.py, 12 busy-loop processes, 10 runs: 7 passed, 3 failed, all three in test_filter_narrows_the_listing, not in the arrow-key tests (the arrow-key tests passed in all 7 runs that reached them). The filter failures are discussed in #14. Not repeated for this rebased branch.

Checked: ruff check passes; on an idle machine the whole tests/test_gui.py passes (33 tests).

conventions.py check QoraDFXM reads the main checkout; nothing it checks changes here.

@NaNIsaac

Copy link
Copy Markdown
Owner Author

Cause of the ubuntu failure: the arrow-key test waited only for rowCount >= 3 and then took model row 0 as the start. On Linux the directory is read unsorted and QFileSystemModel sorts it later from a zero-delay timer, moving persistent indexes, so the start index ended up on the last row (shot_02.tif in the log) and Down had nowhere to go. Windows and macOS list files alphabetically already, which hid it.

7c2204f waits until the rows are in sorted order and picks the start row by path. Test-only change. CI on this commit: ubuntu, windows, ruff, examples and readme (3 OS) all pass.

@NaNIsaac
NaNIsaac merged commit 2b6ebcf into main Oct 24, 2026
8 checks passed
@NaNIsaac
NaNIsaac deleted the fix/gui-arrow-key-waits branch October 24, 2026 17:40
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.

1 participant