Hello community,
here is the log from the commit of package python-pytest-mock for
openSUSE:Factory checked in at 2018-05-11 11:26:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-mock (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-mock.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-mock"
Fri May 11 11:26:38 2018 rev:7 rq:605130 version:1.10.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-mock/python-pytest-mock.changes
2018-04-26 13:34:37.675563733 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-mock.new/python-pytest-mock.changes
2018-05-11 11:26:40.395883543 +0200
@@ -1,0 +2,7 @@
+Sun May 6 19:35:00 UTC 2018 - [email protected]
+
+- update to version 1.10.0:
+ * Add support for the recently added assert_called method in Python
+ 3.6 and mock-2.0. Thanks @rouge8 for the PR (#115).
+
+-------------------------------------------------------------------
Old:
----
pytest-mock-1.9.0.tar.gz
New:
----
pytest-mock-1.10.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-mock.spec ++++++
--- /var/tmp/diff_new_pack.BlPaCW/_old 2018-05-11 11:26:41.055859489 +0200
+++ /var/tmp/diff_new_pack.BlPaCW/_new 2018-05-11 11:26:41.059859343 +0200
@@ -20,7 +20,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-pytest-mock
-Version: 1.9.0
+Version: 1.10.0
Release: 0
Summary: Thin-wrapper around the mock package for easier use with pytest
License: MIT
++++++ pytest-mock-1.9.0.tar.gz -> pytest-mock-1.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/CHANGELOG.rst
new/pytest-mock-1.10.0/CHANGELOG.rst
--- old/pytest-mock-1.9.0/CHANGELOG.rst 2018-04-10 04:43:04.000000000 +0200
+++ new/pytest-mock-1.10.0/CHANGELOG.rst 2018-05-01 19:10:54.000000000
+0200
@@ -1,3 +1,10 @@
+1.10.0
+------
+
+* Add support for the recently added ``assert_called`` method in Python 3.6
and ``mock-2.0``. Thanks `@rouge8`_ for the PR (`#115`_).
+
+.. _#115: https://github.com/pytest-dev/pytest-mock/pull/115
+
1.9.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/PKG-INFO
new/pytest-mock-1.10.0/PKG-INFO
--- old/pytest-mock-1.9.0/PKG-INFO 2018-04-10 04:43:24.000000000 +0200
+++ new/pytest-mock-1.10.0/PKG-INFO 2018-05-01 19:11:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-mock
-Version: 1.9.0
+Version: 1.10.0
Summary: Thin-wrapper around the mock package for easier use with py.test
Home-page: https://github.com/pytest-dev/pytest-mock/
Author: Bruno Oliveira
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/_pytest_mock_version.py
new/pytest-mock-1.10.0/_pytest_mock_version.py
--- old/pytest-mock-1.9.0/_pytest_mock_version.py 2018-04-10
04:43:24.000000000 +0200
+++ new/pytest-mock-1.10.0/_pytest_mock_version.py 2018-05-01
19:11:12.000000000 +0200
@@ -1,4 +1,4 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.9.0'
+version = '1.10.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/pytest_mock.egg-info/PKG-INFO
new/pytest-mock-1.10.0/pytest_mock.egg-info/PKG-INFO
--- old/pytest-mock-1.9.0/pytest_mock.egg-info/PKG-INFO 2018-04-10
04:43:24.000000000 +0200
+++ new/pytest-mock-1.10.0/pytest_mock.egg-info/PKG-INFO 2018-05-01
19:11:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-mock
-Version: 1.9.0
+Version: 1.10.0
Summary: Thin-wrapper around the mock package for easier use with py.test
Home-page: https://github.com/pytest-dev/pytest-mock/
Author: Bruno Oliveira
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/pytest_mock.py
new/pytest-mock-1.10.0/pytest_mock.py
--- old/pytest-mock-1.9.0/pytest_mock.py 2018-04-10 04:43:04.000000000
+0200
+++ new/pytest-mock-1.10.0/pytest_mock.py 2018-05-01 19:10:54.000000000
+0200
@@ -245,6 +245,12 @@
*args, **kwargs)
+def wrap_assert_called(*args, **kwargs):
+ __tracebackhide__ = True
+ assert_wrapper(_mock_module_originals["assert_called"],
+ *args, **kwargs)
+
+
def wrap_assert_methods(config):
"""
Wrap assert methods of mock module so we can hide their traceback and
@@ -257,12 +263,13 @@
mock_module = _get_mock_module(config)
wrappers = {
- 'assert_not_called': wrap_assert_not_called,
+ 'assert_called': wrap_assert_called,
+ 'assert_called_once': wrap_assert_called_once,
'assert_called_with': wrap_assert_called_with,
'assert_called_once_with': wrap_assert_called_once_with,
- 'assert_called_once': wrap_assert_called_once,
- 'assert_has_calls': wrap_assert_has_calls,
'assert_any_call': wrap_assert_any_call,
+ 'assert_has_calls': wrap_assert_has_calls,
+ 'assert_not_called': wrap_assert_not_called,
}
for method, wrapper in wrappers.items():
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.9.0/test_pytest_mock.py
new/pytest-mock-1.10.0/test_pytest_mock.py
--- old/pytest-mock-1.9.0/test_pytest_mock.py 2018-04-10 04:43:04.000000000
+0200
+++ new/pytest-mock-1.10.0/test_pytest_mock.py 2018-05-01 19:10:54.000000000
+0200
@@ -399,6 +399,18 @@
stub.assert_called_once()
+def test_assert_called_wrapper(mocker):
+ stub = mocker.stub()
+ if not hasattr(stub, 'assert_called'):
+ pytest.skip('assert_called_once not available')
+ with assert_traceback():
+ stub.assert_called()
+ stub("foo")
+ stub.assert_called()
+ stub("foo")
+ stub.assert_called()
+
+
@pytest.mark.usefixtures('needs_assert_rewrite')
def test_assert_called_args_with_introspection(mocker):
stub = mocker.stub()