Respect pytest-order in isolated robot tests - #308
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44af34f62e
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06d7d11805
ℹ️ 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".
| job.worker_completed = job.exit_code in ( | ||
| pytest.ExitCode.OK, | ||
| pytest.ExitCode.TESTS_FAILED, | ||
| ) |
There was a problem hiding this comment.
Propagate interrupted worker exits to the parent session
When an isolated test calls pytest.exit() or the worker alone receives SIGINT, pytest.main() returns pytest.ExitCode.INTERRUPTED; this condition classifies that exit as merely incomplete, so _finalize_job emits an ordinary failed-test report and the parent continues running later groups unless --maxfail happens to stop it. Normal pytest semantics abort the session for exit code 2, so handle INTERRUPTED by setting the parent session's stop/interrupted state rather than converting it into a test failure.
Useful? React with 👍 / 👎.
Different implementation of #299. I like this implementation better -- it's similar to the original test loop, except with ordering thrown in, and I find it easier to reason about.
My 🤖 started with the same tests from #299, but I asked it to remove the time.sleep calls... so it did some monkeypatching but I think it's testing what we care about here.
cc @MikeStitt