Answer: Create a path-specific instructions file named python-tests.instructions.md and use the applyTo field set to "tests/**/*.py" so the instructions apply only to Python test files in your repository. Status: Confirmed Entry: tool/github-copilot/settings/path-specific-test-instructions Revision: 2 Digest: sha256:8eec66a57ff251c5 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:34:09Z Last changed: 2026-11-17T13:36:45Z (file name: — → python-tests.instructions.md) Last verified: 2026-11-20T13:16:25Z Next check: 2026-11-21T13:16:25Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of file name | python-tests.instructions.md | [1] | 2026-11-20 applyTo value | tests/**/*.py | [1] | 2026-11-20 Sources: [1] GitHub. "Testing automation - GitHub Docs". https://docs.github.com/en/copilot/tutorials/customization-library/custom-instructions/testing-automation Role: primary. Accessed: 2026-11-20T13:16:25Z Quote: "This example shows a path-specific python-tests.instructions.md file that applies only to Python test files in your repository, using the applyTo field." (Supports: file name) Quote: "applyTo: "tests/**/*.py"" (Supports: applyTo value) Snapshot SHA-256: 4ecb2708197b632827aaa3bffcab26060be46c13076d3b7445f6680e5e36db32 (captured 2026-11-18T13:13:06Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:13:06Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:16:25Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:16:25Z Last attempt: 2026-11-20T13:16:25Z Notes and limitations: Extracted automatically from a single official source (section "Testing automation"). Related: https://latestn.com/tool/github-copilot/settings/per-session-plugin-directories How do I set per-session plugin directories in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/settings/plugin-enablement What decides whether a GitHub Copilot plugin is enabled? https://latestn.com/tool/github-copilot/settings/plugin-file-locations Where does GitHub Copilot CLI look for plugins and in what order are they loaded? https://latestn.com/tool/github-copilot/settings/organize-instruction-files How should I organize GitHub Copilot code review instruction files across my repository? https://latestn.com/tool/github-copilot/settings/override-default-spn How do I override the default SPN for GitHub Copilot in VS Code or JetBrains IDEs? https://latestn.com/tool/github-copilot/settings/path-specific-instructions-for-actions-workflows How do I create a custom instructions file in GitHub Copilot that only applies to GitHub Actions workflow files? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T13:36:45Z | changed | file name: — → python-tests.instructions.md | [1] 2026-11-17T13:36:45Z | changed | File name: python-tests.instructions.md → — | [1] 2026-11-13T03:34:09Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/settings/path-specific-test-instructions/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/settings/path-specific-test-instructions POST: https://latestn.com/dispute/tool/github-copilot/settings/path-specific-test-instructions with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/settings/path-specific-test-instructions?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create custom instructions for GitHub Copilot that apply only to Python test files? Revision 2, last verified 2026-11-20T13:16:25Z. https://latestn.com/tool/github-copilot/settings/path-specific-test-instructions (accessed 2026-11-21T09:52:33Z). @misc{LatestN_tool_github_copilot_settings_path_specific_test_instructions_r2, title = {How do I create custom instructions for GitHub Copilot that apply only to Python test files?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/settings/path-specific-test-instructions}}, note = {Revision 2; digest sha256:8eec66a57ff251c5; last verified 2026-11-20T13:16:25Z; accessed 2026-11-21T09:52:33Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/settings/path-specific-test-instructions