0.1.0
Initial release.
mockey is a Python fixture library that enforces correct mock.patch autospec behaviour, surfacing signature violations that the standard unittest.mock library silently ignores.
Features:
- Global
autospecinjection viapatch_mock_module()-autospec=Trueis automatically applied to everymock.patch/mock.patch.object/mock.patch.multiplecall, no per-patch opt-in required mock.Mock(autospec=...)support viaMockAutospecFixture- adds anautospec=keyword toMock()/MagicMock()constructors with full signature and attribute enforcement- Return-value autospeccing - methods annotated
-> SomeClassreturn an autospeccedSomeClassmock automatically; methods annotated-> Nonereturn actualNone - Constructor signature enforcement - calling
mock.Mock(autospec=MyClass)(wrong_args)raises
TypeError
Full Changelog: https://github.com/claudiubelu/mockey/commits/0.1.0