Hello community,
here is the log from the commit of package python-pytest-mock for
openSUSE:Factory checked in at 2018-04-26 13:34:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-mock (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-mock.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-mock"
Thu Apr 26 13:34:36 2018 rev:6 rq:599637 version:1.9.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-mock/python-pytest-mock.changes
2018-03-05 13:36:19.603267363 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-mock.new/python-pytest-mock.changes
2018-04-26 13:34:37.675563733 +0200
@@ -1,0 +2,11 @@
+Sat Apr 21 16:39:10 UTC 2018 - [email protected]
+
+- update to version 1.9.0:
+ * Add support for the recently added assert_called_once method in
+ Python 3.6 and mock-2.0. Thanks @rouge8 for the PR (#113).
+
+- changes from version 1.8.0:
+ * Add aliases for NonCallableMock and create_autospec to
+ mocker. Thanks @mlhamel for the PR (#111).
+
+-------------------------------------------------------------------
Old:
----
pytest-mock-1.7.1.tar.gz
New:
----
pytest-mock-1.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-mock.spec ++++++
--- /var/tmp/diff_new_pack.2P8m4H/_old 2018-04-26 13:34:38.191544827 +0200
+++ /var/tmp/diff_new_pack.2P8m4H/_new 2018-04-26 13:34:38.195544680 +0200
@@ -18,16 +18,15 @@
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define modname pytest-mock
%bcond_without python2
-Name: python-%{modname}
-Version: 1.7.1
+Name: python-pytest-mock
+Version: 1.9.0
Release: 0
Summary: Thin-wrapper around the mock package for easier use with pytest
License: MIT
Group: Development/Languages/Python
-Url: https://github.com/pytest-dev/%{modname}
-Source:
https://files.pythonhosted.org/packages/source/p/pytest-mock/%{modname}-%{version}.tar.gz
+URL: https://github.com/pytest-dev/pytest-mock
+Source:
https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools >= 36}
BuildRequires: %{python_module setuptools_scm}
@@ -52,7 +51,7 @@
of a test
%prep
-%setup -q -n %{modname}-%{version}
+%setup -q -n pytest-mock-%{version}
%build
%python_build
++++++ pytest-mock-1.7.1.tar.gz -> pytest-mock-1.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/CHANGELOG.rst
new/pytest-mock-1.9.0/CHANGELOG.rst
--- old/pytest-mock-1.7.1/CHANGELOG.rst 2018-03-01 11:53:08.000000000 +0100
+++ new/pytest-mock-1.9.0/CHANGELOG.rst 2018-04-10 04:43:04.000000000 +0200
@@ -1,3 +1,18 @@
+1.9.0
+-----
+
+* Add support for the recently added ``assert_called_once`` method in Python
3.6 and ``mock-2.0``. Thanks `@rouge8`_ for the PR (`#113`_).
+
+.. _#113: https://github.com/pytest-dev/pytest-mock/pull/113
+
+
+1.8.0
+-----
+
+* Add aliases for ``NonCallableMock`` and ``create_autospec`` to ``mocker``.
Thanks `@mlhamel`_ for the PR (`#111`_).
+
+.. _#111: https://github.com/pytest-dev/pytest-mock/pull/111
+
1.7.1
-----
@@ -300,13 +315,14 @@
.. _#2: https://github.com/pytest-dev/pytest-qt/issues/2
-.. _@mathrick: https://github.com/mathrick
-.. _@tigarmo: https://github.com/tigarmo
-.. _@rouge8: https://github.com/rouge8
.. _@fogo: https://github.com/fogo
+.. _@kmosher: https://github.com/kmosher
.. _@marcwebbie: https://github.com/marcwebbie
+.. _@mathrick: https://github.com/mathrick
+.. _@mlhamel: https://github.com/mlhamel
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
+.. _@rouge8: https://github.com/rouge8
.. _@The-Compiler: https://github.com/The-Compiler
-.. _@kmosher: https://github.com/kmosher
+.. _@tigarmo: https://github.com/tigarmo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/PKG-INFO
new/pytest-mock-1.9.0/PKG-INFO
--- old/pytest-mock-1.7.1/PKG-INFO 2018-03-01 11:53:25.000000000 +0100
+++ new/pytest-mock-1.9.0/PKG-INFO 2018-04-10 04:43:24.000000000 +0200
@@ -1,12 +1,11 @@
Metadata-Version: 1.2
Name: pytest-mock
-Version: 1.7.1
+Version: 1.9.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
Author-email: [email protected]
License: MIT
-Description-Content-Type: UNKNOWN
Description: ===========
pytest-mock
===========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/_pytest_mock_version.py
new/pytest-mock-1.9.0/_pytest_mock_version.py
--- old/pytest-mock-1.7.1/_pytest_mock_version.py 2018-03-01
11:53:25.000000000 +0100
+++ new/pytest-mock-1.9.0/_pytest_mock_version.py 2018-04-10
04:43:24.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.7.1'
+version = '1.9.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/pytest_mock.egg-info/PKG-INFO
new/pytest-mock-1.9.0/pytest_mock.egg-info/PKG-INFO
--- old/pytest-mock-1.7.1/pytest_mock.egg-info/PKG-INFO 2018-03-01
11:53:25.000000000 +0100
+++ new/pytest-mock-1.9.0/pytest_mock.egg-info/PKG-INFO 2018-04-10
04:43:24.000000000 +0200
@@ -1,12 +1,11 @@
Metadata-Version: 1.2
Name: pytest-mock
-Version: 1.7.1
+Version: 1.9.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
Author-email: [email protected]
License: MIT
-Description-Content-Type: UNKNOWN
Description: ===========
pytest-mock
===========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/pytest_mock.py
new/pytest-mock-1.9.0/pytest_mock.py
--- old/pytest-mock-1.7.1/pytest_mock.py 2018-03-01 11:53:08.000000000
+0100
+++ new/pytest-mock-1.9.0/pytest_mock.py 2018-04-10 04:43:04.000000000
+0200
@@ -48,10 +48,12 @@
# aliases for convenience
self.Mock = mock_module.Mock
self.MagicMock = mock_module.MagicMock
+ self.NonCallableMock = mock_module.NonCallableMock
self.PropertyMock = mock_module.PropertyMock
self.call = mock_module.call
self.ANY = mock_module.ANY
self.DEFAULT = mock_module.DEFAULT
+ self.create_autospec = mock_module.create_autospec
self.sentinel = mock_module.sentinel
self.mock_open = mock_module.mock_open
@@ -219,6 +221,12 @@
*args, **kwargs)
+def wrap_assert_called_once(*args, **kwargs):
+ __tracebackhide__ = True
+ assert_wrapper(_mock_module_originals["assert_called_once"],
+ *args, **kwargs)
+
+
def wrap_assert_called_once_with(*args, **kwargs):
__tracebackhide__ = True
assert_wrapper(_mock_module_originals["assert_called_once_with"],
@@ -252,6 +260,7 @@
'assert_not_called': wrap_assert_not_called,
'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,
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/test_pytest_mock.py
new/pytest-mock-1.9.0/test_pytest_mock.py
--- old/pytest-mock-1.7.1/test_pytest_mock.py 2018-03-01 11:53:08.000000000
+0100
+++ new/pytest-mock-1.9.0/test_pytest_mock.py 2018-04-10 04:43:04.000000000
+0200
@@ -137,7 +137,7 @@
assert os.listdir(str(tmpdir)) == []
[email protected]('name', ['MagicMock', 'PropertyMock', 'Mock', 'call',
'ANY', 'sentinel', 'mock_open'])
[email protected]('name', ['MagicMock', 'NonCallableMock',
'PropertyMock', 'Mock', 'call', 'ANY', 'create_autospec', 'sentinel',
'mock_open'])
def test_mocker_aliases(name, pytestconfig):
from pytest_mock import _get_mock_module, MockFixture
@@ -388,6 +388,17 @@
stub.assert_called_once_with("foo")
+def test_assert_called_once_wrapper(mocker):
+ stub = mocker.stub()
+ if not hasattr(stub, 'assert_called_once'):
+ pytest.skip('assert_called_once not available')
+ stub("foo")
+ stub.assert_called_once()
+ stub("foo")
+ with assert_traceback():
+ stub.assert_called_once()
+
+
@pytest.mark.usefixtures('needs_assert_rewrite')
def test_assert_called_args_with_introspection(mocker):
stub = mocker.stub()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-mock-1.7.1/tox.ini
new/pytest-mock-1.9.0/tox.ini
--- old/pytest-mock-1.7.1/tox.ini 2018-03-01 11:53:08.000000000 +0100
+++ new/pytest-mock-1.9.0/tox.ini 2018-04-10 04:43:04.000000000 +0200
@@ -1,15 +1,12 @@
[tox]
-envlist = py{27,34,35,36}-pytest{30,31,32,33,34},linting,norewrite
+envlist = py{27,34,35,36}-pytest{34,35},linting,norewrite
[testenv]
passenv = USER USERNAME
deps =
coverage
- pytest30: pytest~=3.0
- pytest31: pytest~=3.1
- pytest32: pytest~=3.2
- pytest33: pytest~=3.3
pytest34: pytest~=3.4
+ pytest35: pytest~=3.5
commands =
coverage run --append --source=pytest_mock.py -m pytest test_pytest_mock.py
@@ -21,8 +18,8 @@
skip_install=True
deps =
pytest-flakes
- restructuredtext_lint
+ restructuredtext_lint
pygments
commands =
py.test --flakes pytest_mock.py test_pytest_mock.py -m flakes
- rst-lint CHANGELOG.rst README.rst
+ rst-lint CHANGELOG.rst README.rst