Errors¶
BigfootError
¶
Bases: Exception
Base class for all bigfoot errors.
UnmockedInteractionError
¶
Bases: BigfootError
Raised at call time: an interaction fired with no matching registered mock.
Message includes: source description, args/kwargs, copy-pasteable mock hint.
Source code in src/bigfoot/_errors.py
UnassertedInteractionsError
¶
Bases: BigfootError
Raised at teardown: timeline contains interactions not matched by assert_interaction().
Message lists each unasserted interaction with copy-pasteable assert hint.
Source code in src/bigfoot/_errors.py
UnusedMocksError
¶
Bases: BigfootError
Raised at teardown: registered mocks with required=True were never triggered.
Message lists each unused mock with hint to either remove or set required=False.
Source code in src/bigfoot/_errors.py
VerificationError
¶
Bases: BigfootError
Raised at teardown when BOTH UnassertedInteractionsError and UnusedMocksError apply.
Contains both reports in separate sections.
Source code in src/bigfoot/_errors.py
InteractionMismatchError
¶
Bases: BigfootError
Raised by assert_interaction() when expected source/fields don't match the next interaction in the timeline.
Message includes: expected description, actual next interaction, remaining timeline.
Source code in src/bigfoot/_errors.py
MissingAssertionFieldsError
¶
Bases: BigfootError
Raised by assert_interaction() when the caller omits one or more assertable fields from **expected.
Attributes: missing_fields: frozenset of field names that were required but absent.
Source code in src/bigfoot/_errors.py
SandboxNotActiveError
¶
Bases: BigfootError
Raised when an intercepted call fires but no sandbox is active.
Attributes: source_id: Identifier of the interceptor that fired without a sandbox.
Message includes hint: 'Did you forget bigfoot_verifier fixture or sandbox() CM?'
Source code in src/bigfoot/_errors.py
ConflictError
¶
Bases: BigfootError
Raised at activate() time if target method is already patched by another library.
Message names the conflicting library and the patched target.