- Update to 2.0.4

* Proof-read docs
  * Reorder function docs
  * Clarify unused stub error message

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mockito?expand=0&rev=31
This commit is contained in:
2026-04-28 11:27:36 +00:00
committed by Git OBS Bridge
commit f28e6f0d49
7 changed files with 301 additions and 0 deletions
+199
View File
@@ -0,0 +1,199 @@
-------------------------------------------------------------------
Tue Apr 28 10:12:01 UTC 2026 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.0.4
* Proof-read docs
* Reorder function docs
* Clarify unused stub error message
-------------------------------------------------------------------
Tue Apr 7 22:51:36 UTC 2026 - Dirk Müller <dmueller@suse.com>
- update to 2.0.0:
* First-class async/await and property/descriptor support.
Chaining. InOrder.
* Enhanced `captor`, new `patch_attr` and `patch_dict`.
* Deprecate `verifyNoMoreInteractions` in favor of
`ensureNoUnverifiedInteractions`.
* Deprecate `verifyNoUnwantedInteractions` in favor of
`verifyExpectedInteractions`.
* Context managers now check usage and any expectations (set
via `expect`) on exit. The usage
* check can be disabled with the environment variable
`MOCKITO_CONTEXT_MANAGERS_CHECK_USAGE="0"`.
* The `between` matcher now supports open ranges, e.g.
`between=(0,)` to assert that at least
* 0 interactions occurred.
* Calling `thenAnswer()` without arguments is now allowed and
is treated like
* `thenReturn()` without arguments: the stubbed method will
return `None`.
* Allow `...` in fixed argument positions as an ad-hoc `any`
matcher.
* Trailing positional `...` keeps its existing "rest"
semantics.
* Expanded `mock({...})` constructor shorthands. Refer
https://mockito-python.readthedocs.io/en/latest/mock-
shorthands.html
* Added a first-class `InOrder` API via ``mockito.InOrder``.
The legacy in-order mode only supported one mock at a time;
-------------------------------------------------------------------
Wed Nov 26 13:59:37 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.5.5
* Improve behavior of a mock's ad hoc methods
* Improve the error message of the safety check in `get_function_host`
* Remove unrelated test in a test function
* Update CHANGES.txt
* Fix recipes markup
* Markup fix in "walk-through"
* Make `thenReturn()` an official shortcut
* Rename and order tests in `when_interface_test`
-------------------------------------------------------------------
Wed Feb 12 07:08:07 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.5.4
* Implement defined behavior for `deepcopy` for mocks. (#91)
-------------------------------------------------------------------
Thu Nov 14 14:19:46 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.5.3:
* Remove now unsupported "asyncio_mode" configuration
* Avoid partial when constructing answers
* Update numpy dev dependency
* Add Python 3.13 to the test matrix
-------------------------------------------------------------------
Sat Mar 16 08:57:47 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.5.0:
* @Oracking fixed `expect` to support a string as its first
argument. All other functions supported that already.
-------------------------------------------------------------------
Thu Sep 29 16:37:08 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- 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]
-------------------------------------------------------------------
Thu Apr 22 06:00:46 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.2.2:
* Fix typo in ``spy2`` doc
- Do not build for Python 3.6, due to no NumPy.
-------------------------------------------------------------------
Wed Apr 1 07:13:22 UTC 2020 - pgajdos@suse.com
- version update to 1.2.1
- @nielsvaneck fixed how we can lookup inherited classmethods.
- Code base now is python 3 compatible. No 2to3 anymore.
- Fine tune error messages on unexpected calls or verifications.
- @felixonmars fixed a small compatibility issue with python 3.8
- Mocking properties has become a bit easier. (#26)
-------------------------------------------------------------------
Mon Apr 8 08:58:08 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Disable python3 building as the mockito is py2 only (git master
is py3 compatible so hopefully next release should be supported)
-------------------------------------------------------------------
Fri Apr 5 12:38:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- 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
-------------------------------------------------------------------
Tue Dec 4 12:50:25 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Mon Dec 11 19:47:18 UTC 2017 - sebix+novell.com@sebix.at
- 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
-------------------------------------------------------------------
Sun Dec 8 16:15:34 UTC 2013 - p.drouand@gmail.com
- Update to version 0.5.2
+ No changelog available
- Remove redundant %clean section
- Adapt setup.py.patch to upstream changes
- Rename it to respect standard naming conventions
- Remove python-mockito.rpmlintrc; problem of execution bits have
been fixed by upstream
-------------------------------------------------------------------
Thu Oct 24 11:08:52 UTC 2013 - speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
-------------------------------------------------------------------
Thu Jul 18 16:48:26 UTC 2013 - berendt@b1-systems.de
- added python-mockito.rpmlintrc
- added setup.py.patch to make package buildable on SLES11 SP3
-------------------------------------------------------------------
Thu Jul 18 12:14:57 CEST 2013 - berendt@b1-systems.de
- added missing python-mockito.changes file
- cleaning up the SPEC
+65
View File
@@ -0,0 +1,65 @@
#
# spec file for package python-mockito
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-mockito
Version: 2.0.4
Release: 0
Summary: Spying framework
License: MIT
URL: https://github.com/kaste/mockito-python
# https://github.com/kaste/mockito-python/issues/36
Source: https://github.com/kaste/mockito-python/archive/%{version}.tar.gz
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module numpy >= 2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%ifpython2
Requires: python2-funcsigs
%endif
%python_subpackages
%description
Mockito is a spying framework originally based on the Java library with the same name.
%prep
%autosetup -p1 -n mockito-python-%{version}
%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc AUTHORS CHANGES.txt README.rst
%license LICENSE
%{python_sitelib}/mockito
%{python_sitelib}/mockito-%{version}.dist-info
%changelog
+24
View File
@@ -0,0 +1,24 @@
*.changes merge=merge-changes
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
+4
View File
@@ -0,0 +1,4 @@
*.obscpio
*.osc
_build.*
.pbuild
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:83500dc398ef5f8551fbdc3b68fca67c6a48c21e9bd87a4c22658ca09779ceb2
size 62238
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:360accf1c7cbe1fa1074f492406446a3efc03c4ad2bf08194dc2460444c12738
size 219841
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d8b65e0eb1573b38a18cd31c8ad70114baa9da4970c6072104de93c543416d3
size 220604