Skip to content

[CI] Type the file name in the EGI import menu test - #861

Merged
arnodelorme merged 1 commit into
developfrom
agent/20261128-fix-readegi-test
Nov 29, 2026
Merged

arnodelorme merged 1 commit into
developfrom
agent/20261128-fix-readegi-test

Conversation

@arnodelorme

Copy link
Copy Markdown
Collaborator

Develop is red on Ubuntu because of one test, and this fixes that test. No product code changes.

  • What failed: tests/test_stream9_gui_importers.py::test_f10_accept_menu_import_updates_shared_session[pop_readegi...] hit its five-second deadline on both Ubuntu jobs of develop (run 46228417844), while macOS and Windows passed.
  • Why: the test fills the file dialog with QFileDialog.selectFile(). Qt leaves the file name box alone when the dialog is visible and that box has keyboard focus, and accept() then returns without closing the dialog. Whether the box has focus on the first timer tick depends on the dialogs opened earlier in the same process, so the failure depends on test order.
  • The fix: the test types the path into the file name box, as a user would. This works with and without focus.
Evidence
  • Reproduced on the Mac, not only on Linux: running the whole file on develop fails with the same message (assert 'pop_readegi' in ['QFileDialog', 'QFileDialog', ...]), and the test passes when run alone. So this is not a Linux defect of the product.
  • Bare Qt script, no EEGPrep: the first dialog of a process accepts the file from selectFile(). Every later one has focus on the name box, keeps an empty name, and accept() returns 21 times in a row without closing. Typing the name closes it at the first try. Same result on Linux (PySide6 6.12.0) and macOS (6.11.0).
  • After the fix: the whole file passes on the Mac twice in a row (38 passed). On Linux (jamming, offscreen) the test passes too. The only failure there is pop_biosig, because that machine's environment has no MNE.
  • Qt source: QFileDialog::selectFile sets the name only if (!isVisible() || !d->lineEdit()->hasFocus()), and QFileDialog::accept returns early when selectedFiles() is empty.

🤖 Generated with Claude Code

selectFile() leaves the name box of a visible QFileDialog alone once
the box has keyboard focus, and accept() then returns without closing
the dialog, so the test hit its five-second deadline on Ubuntu when it
ran after the other tests of its file.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 22s —— View job


Code review

  • Overall assessment: Looks good. This changes one test line, and no product code changes.
  • Highest-risk area: None identified.
  • Merge recommendation: Safe to merge.

The fix in tests/test_stream9_gui_importers.py:205 types the path into the fileNameEdit box of the non-native file dialog (native_file_dialogs=False). The file-dialog tests in tests/test_stream11_datasets.py:226,260,304 and tests/test_stream11_menus.py:80 already do it this way, so the EGI test now matches them. No selectFile() calls are left in tests/. The PR does not change numerical output, so it needs no MATLAB reference run.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None.

EEGLAB parity notes

None. The PR only changes tests.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Waiting for its review, not merged yet. This pull request fixes the one test that kept develop red on Ubuntu after #850. It changes only the test, no product code.

Why it is not merged. Arno asked that a separate Fable reviewer check every change before a merge. Fable reached its usage limit tonight and the reviewer could not start. The limit resets on December 1 at 8 am Pacific, and the chain resumes then. The fix is small and touches only a test, so Arno may also merge it himself before then once CI is green.

What is known. Same failure reproduced on the Mac by running the whole test file (it passes alone), and in a bare Qt script on Linux and macOS: after the first file dialog of a process, selectFile() leaves the name box empty because the box has keyboard focus, and accept() returns without closing. With the fix the whole file passes on the Mac and on jamming. CI was still running when this was written.

— orchestrator

@arnodelorme
arnodelorme merged commit 32e098b into develop Nov 29, 2026
14 checks passed
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