fix: pytest plugin to fail tests when anybodycon is not available#143
Merged
fix: pytest plugin to fail tests when anybodycon is not available#143
Conversation
Add early check in AnyTestItem.runtest() to raise a proper test failure when the AnyBodyCon executable cannot be found, instead of silently passing with an unhandled thread exception. Also add test_no_anybodycon pixi environment and CI job to verify .any tests correctly fail without anybodycon installed. Fixes #142 Co-authored-by: melund <1038978+melund@users.noreply.github.com>
Co-authored-by: melund <1038978+melund@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix test issue for environment without anybodycon
Fix pytest plugin silently passing .any tests when anybodycon is not available
Mar 14, 2026
Switch the runner from ubuntu-latest to windows-latest and add shell: bash since the ! negation operator requires bash (not PowerShell, the default on Windows runners). Co-authored-by: melund <1038978+melund@users.noreply.github.com>
Pixi requires environment names to use only lowercase letters, numbers and dashes. Renamed test_no_anybodycon to test-no-anybodycon in pixi.toml and the workflow file, then ran pixi lock to regenerate the lock file. Co-authored-by: melund <1038978+melund@users.noreply.github.com>
Copilot
AI
changed the title
Fix pytest plugin silently passing .any tests when anybodycon is not available
Run test-no-anybodycon on windows-latest
Mar 14, 2026
Collapse multi-line if condition to single line to match black's expected formatting and pass CI lint check. Co-authored-by: melund <1038978+melund@users.noreply.github.com>
Copilot
AI
changed the title
Run test-no-anybodycon on windows-latest
Fix pixi lock and black formatting for test-no-anybodycon environment
Mar 14, 2026
melund
approved these changes
Mar 15, 2026
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.
The
test_no_anybodyconpixi environment name used underscores, which pixi rejects. After renaming and regenerating the lock file, the CI black lint check failed due to a formatting mismatch.test_no_anybodycon→test-no-anybodycon(pixi requires lowercase letters, numbers, and dashes only)pixi lockwith the corrected environment nametest-no-anybodycon; run job onwindows-latestwithshell: bash(needed for!negation)ifto single line:💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.