Skip to main content

In this article

Coding Standards/Python Tests

Coding Standards/Python Tests
FieldValue
Kindinstruction
Source.github/instructions/coding-standards/python-tests.instructions.md
InvocationApplied automatically to **/*.py
InteractiveNo

What it does

Python test code authoring conventions

When to use it

Use these conventions when Python files define pytest tests, fixtures, parameterized cases, or mocks. They extend the general Python script rules with behavioral naming and Arrange/Act/Assert structure; prefer pytest-mock for new spy and patch behavior while retaining simple monkeypatch use.

Example usage

Provide a concrete example that shows the asset in action, including representative input and the resulting output.