Skip to content

tests: README.md caution about pytest run in GitHub Actions#30666

Merged
peterbarker merged 1 commit intoArduPilot:masterfrom
cclauss:test-README.md
Oct 19, 2025
Merged

tests: README.md caution about pytest run in GitHub Actions#30666
peterbarker merged 1 commit intoArduPilot:masterfrom
cclauss:test-README.md

Conversation

@cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 16, 2025

In tests/README.md:

Caution

pytest tests/ will be run in GitHub Actions.

All Python files that meet pytest discovery rules will be examined, and if pytest finds tests, they will be run.

Files of the form test_*.py or *_test.py should avoid code at global scope because it will be executed in pytest's discovery process. Classes, functions, and code in if __name__ == "__main__": blocks will not be run in pytest's discovery process, but code at global scope (including imports) will be run.

@cclauss cclauss changed the title tests: README.md caution about GitHub Actions tests: README.md caution about pytest run in GitHub Actions Jul 17, 2025
@peterbarker peterbarker merged commit 71acb04 into ArduPilot:master Oct 19, 2025
9 checks passed
@cclauss cclauss deleted the test-README.md branch October 19, 2025 09:41
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.

3 participants