Borrowing it
Nothing to install: this file belongs to iloveitaly/llm-ide-rules. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/iloveitaly/llm-ide-rules/master/.github/instructions/pytest-integration-tests.instructions.mdgit clone --depth 1 https://github.com/iloveitaly/llm-ide-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/iloveitaly/llm-ide-rules/pytest-integration-tests)<a href="https://agentmods.dev/instructions/iloveitaly/llm-ide-rules/pytest-integration-tests"><img src="https://agentmods.dev/badge/instructions/iloveitaly/llm-ide-rules/pytest-integration-tests.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01299 | $0.01299 |
| Opus 5 | $0.00649 | $0.00649 |
| Sonnet 5 | $0.00260 | $0.00260 |
| Haiku 4.5 | $0.00130 | $0.00130 |
Grade A, and why
llm-ide-rules pytest-integration-tests.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pytest Integration Tests
- Look to
app/factories/to generate any required database state- Here's an example of how to create + persist a factory
DistributionFactory.save(domain=PYTHON_TEST_SERVER_HOST)
- Here's an example of how to create + persist a factory
- Add the
serverfactory to each test - Use the
fakerfactory to generate emails, etc. - Don't add obvious
assertdescriptions - Do not use the
db_sessionfixture here. Instead, usewith test_session():if you need to setup complex database state - if a UI timeout is occuring, it could be because it cannot find a element because the rendering has changed. Check the failure screenshot and see if you can correct the test assertion.
- The integration tests can take a very long time to run. Do not abort them if they are taking a long time.
- Use
expect(page.get_by_text("Screening is fully booked")).to_be_visible()instead ofexpect(page.get_by_role("heading")).to_contain_text("Screening is fully booked"). It's less brittle. - Do not use
clientfixtures in an integration test. Integration tests should only use the frontend of the website to interact with the application, not the API. - Use
with page.expect_response("https://example.com/resource") as response_info:to assert against network activity. - Do not
next_button.evaluate("el => el.click()")instead, justlocator.click(). If this doesn't work, stop your work and let me know. - Only use
wait_for_loading(page)if aLONG_INTEGRATION_TEST_TIMEOUTon an expectation does not work:expect(page.get_by_text("Your Matched Doctors")).to_be_visible(timeout=LONG_INTEGRATION_TEST_TIMEOUT)LONG_INTEGRATION_TEST_TIMEOUTshould only be used as a last resort. If you have many of these in a test, let me know and I will debug it.
- Prefer fewer integration tests that cover more functionality. Unlike unit tests, where each test is designed to test a very particular piece of functionality, I want integration tests to cover entire workflows. It's preferred to add more steps to an integration test to test an entire workflow.
- Prefer simple locators. If a
filter,or_, etc is required to capture a button in multiple states it indicates something is wrong in the code. - Use
react_router_urlto generate the frontend url path and do not setbase_url. - End all Playwright tests with
from pytest_playwright_artifacts import assert_no_console_errorsandassert_no_console_errors(request)(capture is the plugin'splaywright_console_loggingfixture).- Test-Specific Ignores: Pass
ignore=[...]toassert_no_console_errorsperpytest-playwright-artifacts(regex strings, compiled patterns, or{"file": "...", "message": "..."}dicts); add a comment explaining why. - Global Ignores: Use
playwright_console_ignoreunder[tool.pytest.ini_options]inpyproject.toml(seepytest-playwright-artifactsREADME).
- Test-Specific Ignores: Pass
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 108 lines · 1,299 tokens per session scan A 728f2396b561
llm-ide-rules pytest-integration-tests.instructions.md is an instructions file published in the GitHub repository iloveitaly/llm-ide-rules (13 stars, last pushed 2d ago), licensed MIT. It adds 1,299 tokens to every session, about $0.0065 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.