tests: make the dash-loop tests actually run (CI red since 15 Sep) - #64
ThinkOffApp wants to merge 1 commit into
Conversation
CI has failed on main for three days, every run the same way:
ModuleNotFoundError: No module named 'pytest'
Ran 115 tests ... FAILED (errors=1)
test_dash_loop.py imported pytest for two `@pytest.mark.skipif` decorators.
pytest is not installed on the runner, and the workflow runs
`python3 -m unittest discover`, so the import blew up before anything ran.
Worse than a red tick: these are bare `def test_*` functions, which unittest
never collects. Even with pytest installed they would not have run under the
command CI actually uses. The dash-loop regressions from #57/#59/#61 - a
stalled poll killing the scheduler, and F's own timeout being overwritten by
the caller's options - have never once executed in CI. The only thing this
file ever reported was its own import error.
Converted to a unittest.TestCase with unittest.skipUnless(node), and the
pytest `tmp_path` fixture replaced with tempfile. Both tests now run and pass.
before Ran 115 tests FAILED (errors=1) dash-loop: never executed
after Ran 121 tests OK dash-loop: 2 running
A permanently red CI is as useless as a green one that checks nothing: nobody
can see a real break in it. Three PRs merged into that state.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8429f75755
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def test_fetch_helper_abort_reaches_the_request(self): | ||
| """codexmb, #61: Object.assign({signal}, o) let the caller's options | ||
| overwrite the helper's own signal, so its timeout never aborted.""" | ||
| r = _run_node(F_HARNESS, _fetch_helper_js()) |
There was a problem hiding this comment.
Cancel the harness's ten-second timer
When Node is available, this newly enabled test keeps every test run alive for roughly ten extra seconds: the third F_HARNESS case calls F(..., 10000), while its stubbed fetch never settles or rejects on abort, so F cannot clear its timeout after the outer abort assertion completes. Running this test alone took 10.29 seconds versus 0.20 seconds for the scheduler test; use a short timeout or explicitly clean up the outstanding timer so the conversion does not impose this delay on every CI run.
Useful? React with 👍 / 👎.
|
Merge order verified — you can take these one at a time in any order. I had only tested the seven branches merged together into a scratch branch, which is not how they will actually land. Re-tested the realistic sequence: this PR first, then each of the others onto the accumulating No conflicts and no rebases needed, even though three of them touch This one first still makes sense — until it lands, the other six show a red tick that means nothing, because |
CI has been red on
mainfor three daysEvery run since 15 Sep fails identically:
tests/test_dash_loop.pyimports pytest for two@pytest.mark.skipifdecorators. pytest is not installed on the runner, and the workflow runspython3 -m unittest discover, so the import fails before anything runs.The worse half
These are bare
def test_*(tmp_path)functions. unittest never collects those, so even with pytest installed they would not have run under the command CI actually uses.The dash-loop regressions from #57 / #59 / #61 have never once executed in CI — a stalled poll killing the scheduler, and
F's own timeout being overwritten by the caller's options. The only thing this file has ever reported is its own import error. Three PRs merged into that state with no test signal.Change
unittest.TestCasewithunittest.skipUnless(shutil.which("node")), and the pytesttmp_pathfixture replaced withtempfile. No test logic altered — the assertions are the same ones codexmb's reviews asked for.A permanently red CI is as useless as a green one that checks nothing: nobody can see a real break in it.
Unblocks the signal on #63.
🤖 Generated with Claude Code