Changelog¶
(unreleased)¶
Other
- Added job to publish coverage reports to https://codecov.io/gl/zef1r/mockify
- Using
-pe
as default mode toinvoke
task runner (with help of config file)- Since now, tags are verified by CI before publishing to any PyPI, so it will not be possible to publish to test PyPI and to not publish to production PyPI (or vice-versa)
0.9.0 (2020-11-08)¶
Added
Added
mockify.core
module to replace importing of core stuff directly frommockify
root module.So instead of doing this:
from mockify import satisfiedIt is recommended to do this:
from mockify.core import satisfiedThis was changed because importing things directly from root module is discouraged, as it leads to longer import times.
Deprecated
Importing core parts of library directly from
mockify
core module is now deprecated - usemockify.core
instead.Since one of upcoming non-fix releases importing core parts of library from
mockify
core module will not work, unless you will use this:from mockify import core
Fixed
- Fixed some
pylint
bugs
Other
- Changelog was reformatted and split into sections in accordance to https://keepachangelog.com/en/1.0.0/
- Added tools for code formatting
- Added
pylint
linter- Small refactoring of project’s development tools
0.8.1 (2020-08-17)¶
Fixed
- Small fix in
mockify.matchers.Object
class to make it work whenmockify.matchers.Any
matcher is used as its argument and always inequal object is used when comparing
0.8.0 (2020-08-08)¶
Added
Added
mockify.core.BaseMock
that acts as common abstract base class for all mocks.Already existing classes
mockify.mock.Mock
andmockify.mock.MockFactory
now inherit from it.Added
mockify.mock.FunctionMock
for mocking Python functions and to be used internally when implementing complex mock classesAdded
mockify.mock.ABCMock
for implementing interfaces defined with help ofabc
module
0.7.1 (2020-06-17)¶
Fixed
- Fix
mockify.matchers.Object
matcher to be inequal to reference object if reference object does not have one or more properties listed in matcher
0.7.0 (2020-06-17)¶
Fixed
- An alias to 0.6.5 to fix versioning (new feature was introduced, and wrong version part was increased by mistake)
0.6.4 (2020-02-26)¶
Added
- New actions introduced (see
mockify.actions
)- New matchers introduced (see
mockify.matchers
)- New assertion errors introduced and improved exception hierarchy (see
mockify.exc
)- Can now define ordered expectations with
mockify.core.ordered()
context manager- Can now patch imports using
mockify.core.patched()
context manager
Changed
- Deprecated code was removed
- Class Registry was renamed to
mockify.core.Session
- All classes for making mocks were replaced by single generic
mockify.mock.Mock
class, supported bymockify.mock.MockFactory
class
Fixed
- Better reporting of expectation location in assertion messages
Other
- Improved documentation
- Documentation is now tested by Sphinx
- CI workflow updated + added testing against various Python versions (3.x for now)
- Many other improvements in the code and the tests
0.5.0 (2019-07-27)¶
Added
- Added
mockify.mock.Namespace
mock class
Changed
- Class
mockify.mock.Object
can now be used without subclassing and has API similar to other mock classes- Module mockify.helpers was merged to library core
- Module mockify.times was renamed to
mockify.cardinality
- Module mockify.engine is now available via
mockify
- Modules mockify.mock.function and mockify.mock.object are now merged into
mockify.mock
Other
- Dependency management provided by pipenv
- Project’s CLI provided by Invoke library
- Use Sphinx Read The Docs theme for documentation
0.2.1 (2019-01-05)¶
Added
- Added FunctionFactory mocking utility
Changed
- Changed Registry.assert_satisfied method to allow it to get mock names to check using positional args
Other
- Updated copyright notice
- Added description to Alabaster Sphinx theme used for docs
- Script for running tests added (pytest wrapper)
- Updated copyright.py script and hardcode year the project was started and author’s name
0.1.12 (2019-01-01)¶
- First release published to PyPI