Repository navigation
Unblock Dependabot: pytest-asyncio loop scope, and a hanging TUI test - #21
Merged
Merged
Conversation
- Set asyncio_default_fixture_loop_scope = "function", the scope pytest-asyncio will default to - With pytest 9.2.0, pytest-asyncio's "option is unset" deprecation warning is raised while pytest configures, and -W error turns it into an internal error before any test runs. This unblocks Dependabot #5 - The suite has no async fixtures, so no fixture changes behavior; 1649 tests pass with -W error on pytest 9.1.1 and 9.2.0
- The delete test clicked Delete as soon as the dialog became the screen. Its buttons can still be unmounted or 0x0 then, so the click landed on no widget, the dialog never answered, and wait_for_complete() hung until the 120 s guard: 3 of about 7 CI runs, and 3 of 30 local runs under heavy load. A test bug, not an app one: nobody can click a button before it is drawn - _settled() waits until the target widget has a non-empty region that holds still for a pause (and has focus, for the export test's Enter). The delete test also asserts its click landed, so a miss fails at once - Under heavier load than the original repro, 45 of 45 runs pass Closes #20
junxit
force-pushed
the
fix/pytest-asyncio-loop-scope
branch
from
November 16, 2026 17:39
a5a2cdb to
d326ab6
Compare
junxit
pushed a commit
that referenced
this pull request
Nov 16, 2026
- Dependabot update of the dev extra's pytest pin; rebased onto main, and CI (lint, format, tests on macOS) passed on this exact commit - Needed #21 first: pytest 9.2 raises pytest-asyncio's unset-loop-scope warning at configure, which -W error made fatal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes that the Dependabot PRs need to go green. Each is a separate commit; merge with rebase to keep them.
1.
chore: set pytest-asyncio's fixture loop scopeasyncio_default_fixture_loop_scope = "function".-W errorturns that into anINTERNALERRORbefore any test runs.2.
test: let dialogs settle before sending them input(closes #20)test_opening_a_session_does_not_cancel_a_deleteclicked Delete as soon as the dialog became the screen. At that point its button can still have an empty region, so the click lands on nothing andwait_for_complete()hangs until the 120 s guard.pilot.clickreturns False and the dialog stays open. After the dialog settles, the click lands._settled()helper waits for a non-empty, stable region (and for focus, for the export test). The delete test also asserts that its click landed.Checked locally: full suite, 1649 passed with
-W error, on this branch (pytest 9.1.1, pytest-asyncio 1.5.0);ruff checkandruff format --checkclean.🤖 Generated with Claude Code