Skip to content

Respect pytest-order in isolated robot tests - #308

Open
virtuald wants to merge 3 commits into
mainfrom
pytest-order
Open

Respect pytest-order in isolated robot tests#308
virtuald wants to merge 3 commits into
mainfrom
pytest-order

Conversation

@virtuald

Copy link
Copy Markdown
Member

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

@virtuald

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread subprojects/robotpy-wpilib/wpilib/testing/pytest_isolated_tests_plugin.py Outdated
@virtuald

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +517 to +520
job.worker_completed = job.exit_code in (
pytest.ExitCode.OK,
pytest.ExitCode.TESTS_FAILED,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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