Registry / testing / stubs
library1.0.0pypypi✓ verified 85d ago

Tools for setting up stubs and mocks in Python tests. Version 1.0.0, currently at initial release with no defined release cadence.

pip install stubs
INSTALL
IMPORT
SIG · STUBS
S
stubs
testingpythonv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stub
✓ from stubs import stub
✗ from stubs import Stub
expect
✓ from stubs import expect
matchers
✓ from stubs import matchers

Create a stub and set a return value for a method.

from stubs import Stub stub = Stub() stub.return_value('func', 42) result = stub.func() print(result) # 42
Debug
Known issues
gotchaNo known breaking changes as library is at version 1.0.0. However, the API is minimal; ensure you use the correct import path.
fix
Use 'from stubs import Stub' instead of 'import stubs'.
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Oct 31, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources
stubs — pip install stubs · libregistry