Commit 05cf868
fix: pytest plugin to fail tests when anybodycon is not available (#143)
* Initial plan
* Fix pytest plugin to fail tests when anybodycon is not available
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>
* Address code review: fix pytest.fail() usage and simplify CI shell logic
Co-authored-by: melund <1038978+melund@users.noreply.github.com>
* Change test-no-anybodycon CI job to run on windows-latest
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>
* Rename pixi env to test-no-anybodycon (dashes) and run pixi lock
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>
* Fix black formatting in pytest_plugin.py
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>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: melund <1038978+melund@users.noreply.github.com>1 parent f095b88 commit 05cf868
4 files changed
Lines changed: 999 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
380 | 387 | | |
381 | 388 | | |
382 | 389 | | |
| |||
0 commit comments