repeated-unimplemented-test-contract
Share repeated typed fail-fast abstract operations between test fakes.
Why
Copied unconfigured operations add test support code and drift independently when a contract changes.
Fix
Use one explicit typed strict test base for the contract. Preserve each leaf fake's configured behavior and failure timing; verify that the complete base and wiring reduce maintained code.
Examples
# Example test package.from abc import ABC, abstractmethod
class Store(ABC): @abstractmethod def read(self, key: str) -> str: pass
class First(Store): def read(self, key: str) -> str: raise NotImplementedError
class Second(Store): def read(self, key: str) -> str: raise NotImplementedError# Example test package.from abc import ABC, abstractmethod
class Store(ABC): @abstractmethod def read(self, key: str) -> str: pass
class First(Store): def read(self, key: str) -> str: raise NotImplementedError
class Second(Store): def read(self, key: str) -> str: return key