agentleFS
Galbaz1Galbaz1/video-research-mcp/tests/AGENTS.md

video-research-mcp / tests

AGENTS.md23 starsChanged 38 days agoMITView on GitHub

Applies to files under tests/.

  • Reads credentials

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Test framework is pytest with asyncio_mode = "auto".

    line 7
  2. Distinctive:

    Keep tests unit-level with mocked Gemini.

    line 8
  3. Distinctive:

    Import tool functions directly from module paths.

    line 26
  4. Very specific:

    Use GIVEN/WHEN/THEN docstrings for non-trivial tests.

    line 30
  5. Distinctive:

    Use passthrough retry mocks where session tests depend on retry helpers.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md (tests scope)

Applies to files under tests/.

Testing Patterns

  • Test framework is pytest with asyncio_mode = "auto"; avoid unnecessary @pytest.mark.asyncio.
  • Keep tests unit-level with mocked Gemini; no real API calls.
  • Standard run command: PYTHONPATH=src uv run pytest tests/ -v.

Fixture Expectations

  • mock_gemini_client: patches GeminiClient.get(), .generate(), .generate_structured(), .generate_json_validated().
  • clean_config: resets config singleton between tests.
  • mock_weaviate_client: patches Weaviate client + collection.
  • mock_weaviate_disabled: ensures Weaviate is disabled (depends on clean_config).
  • _unwrap_fastmcp_tools: ensures tools remain callable.
  • _set_dummy_api_key: sets non-real API key for tests.
  • _disable_tracing (autouse): sets GEMINI_TRACING_ENABLED=false.
  • _isolate_dotenv: blocks loading real .env.
  • _isolate_upload_cache: isolates upload cache to temp dir.
  • _isolate_durable_jobs: isolates VRM_JOB_DB in a temporary SQLite database.

Test Style

  • Import tool functions directly from module paths.
  • Mock external services, not internal logic under test.
  • Assert structured tool errors via make_tool_error() shape.
  • For structured-output tests, return concrete model instances from mocked generate_structured.
  • Use GIVEN/WHEN/THEN docstrings for non-trivial tests.

Context Cache Tests

  • Clear _registry, _pending, and _suppressed state in fixtures.
  • Patch registry path to temp directories; never touch real filesystem.
  • Use passthrough retry mocks where session tests depend on retry helpers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.