This project follows semantic versioning.
Types of changes:
- Added: New features.
- Changed: Changes in existing functionality.
- Deprecated: Soon-to-be removed features.
- Removed: Removed features.
- Fixed: Bug fixes.
- Infrastructure: Changes in build or deployment infrastructure.
- Documentation: Changes in documentation.
- Drop support for Python 3.8.
- Stubs with spec pass isinstance test with the spec object.
- Raise an
AttributeError
ifreturn_value
orside_effect
is called when spying.
- Fix spec defined as a list of strings fails with
AttributeError
.
- Add Pytest 8 to the test matrix.
- Add
Mock.get_mock
method. - Add support for mocking class attributes.
- Add support for mocking instance attributes.
- Patch
TextResult
class instead ofTextTestResult
class inunittest
integration.
- Add CI testing for Python 3.13.
- Update Readthedocs configuration.
- Add
unittest
integration.
- Remove
pytest
from dependencies. Chainmock now works also withunittest
sopytest
is not a required dependency anymore.
- Drop support for pytest v6.0 and v6.1.
- Add pypy3.10 to tox test run.
- Add overview, user guide, contributing and changelog sections to documentation.
- Raise an exception if non-callables are spied.
- Fix mocks leak to next test if pytest setup fails.
- Set name to unittest mocks for better error messages.
- Raise AttributeError if async asserts called without AsyncMock.
- Fix mocking chained async methods and properties.
- Export
mock.AnyOf
helper class.
- Use force_property=True always with kwargs.
- Fix spying init method fails.
- Add support for mocking module variables.
- Add
force_async
parameter toMock.mock
method.
- Return self when Mock is called directly.
- Add
force_property
parameter toMock.mock
method. - Convert kwargs to properties for stubs without a spec.
- Implement property mocking with patching.
- Fix stub assertions not executed.
- Fix stub properties attached to Mock class.
- Support setting properties for stubs with spec.
- Fix stubs are cached.
- Implement
Assert.any_await_with
method. - Implement
Assert.any_call_with
method. - Implement
Assert.all_awaits_with
method. - Implement
Assert.all_calls_with
method. - Implement
Assert.match_args_last_await
method. - Implement
Assert.match_args_last_call
method. - Implement
Assert.match_args_any_await
method. - Implement
Assert.match_args_any_call
method. - Implement
Assert.match_args_all_awaits
method. - Implement
Assert.match_args_all_calls
method. - Implement
Assert.get_mock
method. - Add ANY_TYPE argument matching helpers.
- Prevent spying or mocking the same attribute twice.
- Fix await count mixed with call count.
- Implement spying.
- Add called at least and at most modifiers.
- Support mocking and spying mangled methods.
- Support mocking and spying proxies.
- Support mocking non-existing attributes.
- Support spying async methods and functions.
- Add stdlib re-exports.
- Test Python and Pytest versions using tox.
Initial release.