Flexmock

Latest version: v0.12.2

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

Scan your dependencies

Page 2 of 3

0.11.0

Added

- Add Python 3.8, 3.9, 3.10, and 3.11 support.
- Add type annotations.

Changed

- **BREAKING CHANGE**: Flexmock needs to be imported explicitly using `from flexmock import flexmock`.
The hack that allowed flexmock to be imported directly using `import flexmock` did not work well with static analysis tools.
- Many error messages have been improved.
- Undocumented methods `Expectation.reset`, `Expectation.verify`, and `Expectation.match_args` that were unintentionally left public are now private methods.
- Undocumented attributes in `Mock` and `Expectation` are now private. These attributes were never meant to be accessed directly.

Removed

- Drop Python 2.7, 3.4, 3.5 support.
- Drop Pytest 4.x support.
- Remove unittest2 and nose integrations. unittest2 and nose are not maintained anymore.
- **BREAKING CHANGE**: Removed support for calling `once`, `twice`, `never`, and `mock` methods
without parentheses. This allows code completion and static analysis to work with these methods.

Fixed

- Fix `should_call` is broken if called on a fake object.
- Fix `and_raise` allows invalid arguments for an exception.

Infrastructure

- Run linters and tests using Github Actions.
- Add coverage reporting using Codecov.

Documentation

- Add contribution documentation.
- Use Mkdocs instead of Sphinx to build the documentation.

0.10.10

Fixed

- Fix AttributeError raised when mocking a proxied object.

0.10.9

Fixed

- Fix flexmock not mocking methods properly on derived classes.

0.10.8

Fixed

- Fix `with_args` not working built-in functions.

0.10.7

Fixed

- Fix `with_args` not working built-in functions and methods.
- Fix previous pytest `--durations` fix not working.

0.10.6

Fixed

- Fix flexmock broken with Pytest 4 & 5.
- Fix new_instances method not working with Python 2.7.
- Fix multiple expectations for the same classmethod are not matched.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.