fakes-in-shared-location
Review named top-level test doubles for shared-support ownership unless they are intentionally scenario-local.
Why
Reusable doubles hidden in an individual test module are difficult to discover and are often recreated. A per-file warning cannot prove cross-module reuse, so scenario-local doubles may remain with an exact rationale.
Fix
Move a reusable double to a testing, fakes, stubs, mocks, doubles, helpers, support, or test_utils module. Keep a deliberately local double near its scenario with an exact SARJ428 suppression and rationale.
Examples
class FakePaymentGateway: async def charge(self, amount: int) -> None: passdef test_decline_retries_once(): class FakePaymentGateway: async def charge(self, amount: int) -> None: raise Declined()
assert retries(FakePaymentGateway()) == 1