← Về thư mục
harness/faults.py
- FakeClock · class · L12-L29 — class FakeClock
- init · method · L15-L16 — def init(self, start_ms: int = 1_000_000)
- monotonic_ms · method · L18-L19 — def monotonic_ms(self) -> int
- advance_ms · method · L21-L24 — def advance_ms(self, milliseconds: int = 1) -> None
- sleep · method · L26-L29 — def sleep(self, seconds: float) -> None
- FakeUUIDFactory · class · L32-L45 — class FakeUUIDFactory
- init · method · L35-L38 — def init(self, start: int = 1)
- call · method · L40-L45 — def call(self) -> str
- InjectedFault · class · L48-L61 — class InjectedFault(RuntimeError): # A plain exception subclass (not a dataclass): BaseException.args stays # populated for logging/pickle, and identity equality/hash are preserved.
- init · method · L51-L58 — def init( self, point: str, kind: str, message: str, retryable: bool = False ) -> None
- str · method · L60-L61 — def str(self) -> str
- FaultSchedule · class · L64-L89 — class FaultSchedule
- init · method · L67-L70 — def init(self, specs: Iterable[FaultSpec] = ())
- check · method · L72-L85 — def check(self, point: str) -> InjectedFault | None
- unfired · method · L88-L89 — def unfired(self) -> tuple[tuple[str, int], ...]