Skip to content

Commit 7f04d47

Browse files
balloobCopilotfrenck
authored
Update testing instructions in AGENTS.md (home-assistant#170657)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
1 parent b9575ee commit 7f04d47

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ This repository contains the core of Home Assistant, a Python 3 based home autom
2828

2929
## Testing
3030

31+
- Use `uv run pytest` to run tests
32+
- After modifying `strings.json` for an integration, regenerate the English translation file before running tests: `.venv/bin/python3 -m script.translations develop --integration <integration_name>`. Tests load translations from the generated `translations/en.json`, not directly from `strings.json`.
3133
- When writing or modifying tests, ensure all test function parameters have type annotations.
3234
- Prefer concrete types (for example, `HomeAssistant`, `MockConfigEntry`, etc.) over `Any`.
3335
- Prefer `@pytest.mark.usefixtures` over arguments, if the argument is not going to be used.

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This repository contains the core of Home Assistant, a Python 3 based home autom
1818

1919
## Testing
2020

21+
- Use `uv run pytest` to run tests
22+
- After modifying `strings.json` for an integration, regenerate the English translation file before running tests: `.venv/bin/python3 -m script.translations develop --integration <integration_name>`. Tests load translations from the generated `translations/en.json`, not directly from `strings.json`.
2123
- When writing or modifying tests, ensure all test function parameters have type annotations.
2224
- Prefer concrete types (for example, `HomeAssistant`, `MockConfigEntry`, etc.) over `Any`.
2325
- Prefer `@pytest.mark.usefixtures` over arguments, if the argument is not going to be used.

0 commit comments

Comments
 (0)