Expand description
Integration-test lints (issue #19; rules #48–#52) — the integration lint
command.
A lint here is a deterministic style/mechanism check on test code, as
opposed to the structural location / coverage rules. This module hosts
the mocking mechanism & style lints; more lints will join them under the
same command.
Detection is AST-based: each Python test file is parsed with
rustpython_parser and the tree is walked.
Implemented lints:
no-monkeypatch(#49): a test/fixture function that declares themonkeypatchparameter (pytest’s fixture). Patch withunittest.mockwrapped in apytest.fixtureinstead.
Structs§
- Violation
- A single lint violation found in a test file.
Functions§
- find_
violations - Scan the Python test files under
rootand return every lint violation, sorted by(file, line)for deterministic output.