From 28f19a476f87eb8c54024cf3affa86553f0f1bdc Mon Sep 17 00:00:00 2001 From: youknowdot Date: Wed, 14 Oct 2026 23:56:10 -0700 Subject: [PATCH] Document snippet test placement policy (#9137) Assisted-by: OpenAI Codex:model version unavailable --- AGENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9aa4cc677..c814ce520 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -116,6 +116,9 @@ rm -r target/debug/build/rustpython-* && find . | grep -E "\.pyc$" | xargs rm -r ### Testing +- Never add tests to `extra_tests/snippets` that duplicate coverage in `Lib/test`. +- Prefer adding tests to the most closely related existing file in `extra_tests/snippets` rather than creating a new snippet file. + ```bash # Run Rust unit tests cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi