* @Oracking fixed `expect` to support a string as its first
argument. All other functions supported that already.
assert arg.all_values == [123, 456]
- Do not build for Python 3.6, due to no NumPy.
- Fine tune error messages on unexpected calls or verifications.
- Remove python-mockito.rpmlintrc; problem of execution bits have
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mockito?expand=0&rev=21
- Release 1.4.0 (August 25, 2022)
- @avandierast implemented `thenCallOriginalImplementation`. See #60
# Let `os.path.exists` use the real filesystem (often needed when
# the testing framework needs itself a working `os.path.exists`
# implementation) *but* fake a `.flake8` file.
when(os.path).exists(...).thenCallOriginalImplementation()
when(os.path).exists('.flake8').thenReturn(True)
- Release 1.3.5 (August 18, 2022)
- Restore compatibility with Python 2.7
- Release 1.3.3 (June 23, 2022)
- Hotfix: Correctly unstub methods extracted to the module level, for example ``random.randint()`` et.al. from the standard library. See #53
- Release 1.3.2 (June 23, 2022)
- Let `mock(spec=SomeClass)` work just as `mock(SomeClass)`
- Release 1.3.1 (June 14, 2022)
- Reimplement `captor` to capture only during execution phase of a test.
- Release 1.3.0 (December 3, 2021)
- Teach `captor` to remember all used values (@shashankrnr32). E.g.
arg = captor()
mock.do_something(123)
mock.do_something(456)
verify(mock).do_something(arg)
assert arg.all_values == [123, 456]
OBS-URL: https://build.opensuse.org/request/show/1007025
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mockito?expand=0&rev=19
- Disable python3 building as the mockito is py2 only (git master
is py3 compatible so hopefully next release should be supported)
- Update to 1.1.1:
* Added forget_invocations function. Thanks to @maximkulkin
* Fix: The context manager (with) has now a proper implementation
* Fix: Calling patch with two arguments can now be used with with
* Fix: Do not treat the placeholder arguments (Ellipsis, args, kwargs) as special on call time anymore. (T.i. they only have a meaning when stubbing or verifying.)
* Enhancement: Changed some truthy or equality tests to identity (is) tests. This reduces edge-cases where some user object defines __eq__ or __bool__. (Hello _numpy_!)
- Run tests
OBS-URL: https://build.opensuse.org/request/show/692235
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mockito?expand=0&rev=7
* Added forget_invocations function. Thanks to @maximkulkin
* Fix: The context manager (with) has now a proper implementation
* Fix: Calling patch with two arguments can now be used with with
* Fix: Do not treat the placeholder arguments (Ellipsis, args, kwargs) as special on call time anymore. (T.i. they only have a meaning when stubbing or verifying.)
* Enhancement: Changed some truthy or equality tests to identity (is) tests. This reduces edge-cases where some user object defines __eq__ or __bool__. (Hello _numpy_!)
- Run tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mockito?expand=0&rev=12
- update to version 1.0.12
* see CHANGES.txt for a detailed changelog
* changes in version 1.0.12:
- Better error messages for failed verifications.
* changes in version 1.0.7 - 1.0.10
- ``verifyZeroInteractions`` implemented. This is actually a *breaking change*, because ``verifyZeroInteractions`` was an alias for ``verifyNoMoreInteractions`` (sic!).
- All `verify*` functions now warn you if you pass in an object which was never stubbed.
* changes in version 1.0.0 - 1.0.5
- mockito's strict mode is far more strict than before
- ``mock``, ``when``, ``verify`` return mostly empty objects. It is unlikely to have a method_name clash.
- ``Mock()`` is now an implementation detail; it is **not** exported anymore. Use ``mock()``.
* changes in version 0.7.1:
- bugfixes
* changes in version 0.7.0:
- bugfixes
* changes in version 0.6.1:
- Added ``thenAnswer(callable)``. The callable will be called to compute the answer the stubbed method will return. For that it will receive the arguments of the caller.
* changes in version 0.6.0:
- Breaking change: Throw early when calling not expected methods in strict mode.
* changes in version 0.5.3:
- Remove hard coded distribute setup files.
- Remove no longer needed patch python-mockito-0.5.2-setup.py.patch
OBS-URL: https://build.opensuse.org/request/show/556388
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mockito?expand=0&rev=5