Chainmock

Latest version: v0.11.0

Safety actively analyzes 623866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.11.0

Added

- Stubs with spec pass isinstance test with the spec object.

Changed

- Raise an `AttributeError` if `return_value` or `side_effect` is called when
spying.

Fixed

- Fix spec defined as a list of strings fails with `AttributeError`.

Infrastructure

- Add Pytest 8 to the test matrix.

0.10.0

Added

- Add `Mock.get_mock` method.
- Add support for mocking class attributes.
- Add support for mocking instance attributes.

Changed

- Patch `TextResult` class instead of `TextTestResult` class in `unittest`
integration.

Infrastructure

- Add CI testing for Python 3.13.
- Update Readthedocs configuration.

0.9.0

Added

- Add `unittest` integration.

Changed

- Remove `pytest` from dependencies. Chainmock now works also with `unittest`
so `pytest` is not a required dependency anymore.

Removed

- Drop support for pytest v6.0 and v6.1.

Infrastructure

- Add pypy3.10 to tox test run.

Documentation

- Add overview, user guide, contributing and changelog sections to documentation.

0.8.2

Changed

- Raise an exception if non-callables are spied.

0.8.1

Fixed

- Fix mocks leak to next test if pytest setup fails.

0.8.0

Changed

- Set name to unittest mocks for better error messages.
- Raise AttributeError if async asserts called without AsyncMock.

Fixed

- Fix mocking chained async methods and properties.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.