This is an automated email from the ASF dual-hosted git repository.
jason810496 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new bf4726272d8 Clarify conf_vars usage in async tests in AGENTS.md
(#77628)
bf4726272d8 is described below
commit bf4726272d8f42c89de2a125d5d84b1a7fd99a84
Author: ChickenBenny <[email protected]>
AuthorDate: Fri Nov 27 11:51:21 2026 +0800
Clarify conf_vars usage in async tests in AGENTS.md (#77628)
---
AGENTS.md | 2 +-
dev/skill-evals/last-eval-hash.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/AGENTS.md b/AGENTS.md
index 82556e00d41..abf1105b095 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -164,7 +164,7 @@ reported as such are described in "What is NOT considered a
security vulnerabili
- Target exactly 100% coverage of what the PR changes — no more, no less.
Every changed or added behaviour must have a test; every test must fail without
the PR's change. Do not add tests for pre-existing logic that was already
present before the PR, and do not test standard-library or third-party
functions. The exception is deliberate behaviour or integration tests, which
may cross those boundaries by design.
- Use pytest patterns, not `unittest.TestCase`.
- Use `spec`/`autospec` when mocking.
-- Prefer `@mock.patch` decorators over `with mock.patch(...)` context managers
for patching. Use `conf_vars` (from `tests_common.test_utils.config`) for
Airflow config overrides — as a decorator when the value is fixed, as a context
manager when it varies via `@pytest.mark.parametrize`.
+- Prefer `@mock.patch` decorators over `with mock.patch(...)` context managers
for patching. Use `conf_vars` (from `tests_common.test_utils.config`) for
Airflow config overrides — as a decorator when the value is fixed, as a context
manager when it varies via `@pytest.mark.parametrize` or is only known at run
time. In `async def` tests always use it as a context manager inside the body:
as a decorator it hides the coroutine from pytest-asyncio and the test fails.
- Use `time_machine` for time-dependent tests. Do not use `datetime.now()`
- Use `@pytest.mark.parametrize` for multiple similar inputs — consolidate
tests that only differ in input/expected values into a single parametrized test.
- Use `@pytest.mark.db_test` for tests that require database access.
diff --git a/dev/skill-evals/last-eval-hash.txt
b/dev/skill-evals/last-eval-hash.txt
index e877508d44d..db3fc3f45f6 100644
--- a/dev/skill-evals/last-eval-hash.txt
+++ b/dev/skill-evals/last-eval-hash.txt
@@ -1,3 +1,3 @@
# Generated by dev/skill-evals/eval.py — do not edit or resolve conflicts by
hand.
# Run `prek run run-skill-eval --hook-stage manual --all-files` to regenerate.
-2e883af3df642bedae6ec9d6bae704dc91cee77871ebbe18894bd4b69195536e
+b08a9e5100b01c7fc61d8bd6637489c62e764dab1c83e7783a11d097dc14e2f6