Hello community,

here is the log from the commit of package python-pytest-mock for 
openSUSE:Factory checked in at 2019-04-04 12:00:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-mock (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-mock.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-mock"

Thu Apr  4 12:00:26 2019 rev:10 rq:690275 version:1.10.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-mock/python-pytest-mock.changes    
2019-03-29 20:37:43.634648758 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-mock.new.3908/python-pytest-mock.changes
  2019-04-04 12:00:30.517272440 +0200
@@ -1,0 +2,6 @@
+Mon Apr  1 08:34:55 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.10.3:
+  * Fix test suite in Python 3.8. Thanks @hroncok for the report and @blueyed 
for the PR (#140).
+
+-------------------------------------------------------------------

Old:
----
  pytest-mock-1.10.2.tar.gz

New:
----
  pytest-mock-1.10.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-mock.spec ++++++
--- /var/tmp/diff_new_pack.4y0lg3/_old  2019-04-04 12:00:31.857273302 +0200
+++ /var/tmp/diff_new_pack.4y0lg3/_new  2019-04-04 12:00:31.861273304 +0200
@@ -20,7 +20,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-pytest-mock
-Version:        1.10.2
+Version:        1.10.3
 Release:        0
 Summary:        Thin-wrapper around the mock package for easier use with pytest
 License:        MIT
@@ -60,7 +60,7 @@
 
 %check
 export PYTHONDONTWRITEBYTECODE=1
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
py.test-%{$python_version} test_pytest_mock.py
+%pytest test_pytest_mock.py
 
 %files %{python_files}
 %doc CHANGELOG.rst

++++++ pytest-mock-1.10.2.tar.gz -> pytest-mock-1.10.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/.travis.yml 
new/pytest-mock-1.10.3/.travis.yml
--- old/pytest-mock-1.10.2/.travis.yml  2019-03-25 12:55:25.000000000 +0100
+++ new/pytest-mock-1.10.3/.travis.yml  2019-03-30 14:26:09.000000000 +0100
@@ -1,4 +1,5 @@
 language: python
+dist: xenial
 
 install:
   - pip install -U pip
@@ -27,8 +28,8 @@
       env: TOXENV=py36
     - python: '3.7'
       env: TOXENV=py37
-      sudo: required
-      dist: xenial
+    - python: '3.8-dev'
+      env: TOXENV=py38
     - python: '3.6'
       env: TOXENV=linting
     - python: '3.6'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/CHANGELOG.rst 
new/pytest-mock-1.10.3/CHANGELOG.rst
--- old/pytest-mock-1.10.2/CHANGELOG.rst        2019-03-25 12:55:25.000000000 
+0100
+++ new/pytest-mock-1.10.3/CHANGELOG.rst        2019-03-30 14:26:09.000000000 
+0100
@@ -1,3 +1,11 @@
+1.10.3
+------
+
+* Fix test suite in Python 3.8. Thanks `@hroncok`_ for the report and 
`@blueyed`_ for the PR (`#140`_).
+
+.. _#140: https://github.com/pytest-dev/pytest-mock/pull/140
+.. _@hroncok: https://github.com/hroncok
+
 1.10.2
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/PKG-INFO 
new/pytest-mock-1.10.3/PKG-INFO
--- old/pytest-mock-1.10.2/PKG-INFO     2019-03-25 12:55:44.000000000 +0100
+++ new/pytest-mock-1.10.3/PKG-INFO     2019-03-30 14:26:27.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-mock
-Version: 1.10.2
+Version: 1.10.3
 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
@@ -368,6 +368,7 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Testing
 Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
 Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/_pytest_mock_version.py 
new/pytest-mock-1.10.3/_pytest_mock_version.py
--- old/pytest-mock-1.10.2/_pytest_mock_version.py      2019-03-25 
12:55:44.000000000 +0100
+++ new/pytest-mock-1.10.3/_pytest_mock_version.py      2019-03-30 
14:26:26.000000000 +0100
@@ -1,4 +1,4 @@
 # coding: utf-8
 # file generated by setuptools_scm
 # don't change, don't track in version control
-version = '1.10.2'
+version = '1.10.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/pytest_mock.egg-info/PKG-INFO 
new/pytest-mock-1.10.3/pytest_mock.egg-info/PKG-INFO
--- old/pytest-mock-1.10.2/pytest_mock.egg-info/PKG-INFO        2019-03-25 
12:55:44.000000000 +0100
+++ new/pytest-mock-1.10.3/pytest_mock.egg-info/PKG-INFO        2019-03-30 
14:26:26.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-mock
-Version: 1.10.2
+Version: 1.10.3
 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
@@ -368,6 +368,7 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Testing
 Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
 Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/setup.py 
new/pytest-mock-1.10.3/setup.py
--- old/pytest-mock-1.10.2/setup.py     2019-03-25 12:55:25.000000000 +0100
+++ new/pytest-mock-1.10.3/setup.py     2019-03-30 14:26:09.000000000 +0100
@@ -32,6 +32,7 @@
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
         "Topic :: Software Development :: Testing",
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/test_pytest_mock.py 
new/pytest-mock-1.10.3/test_pytest_mock.py
--- old/pytest-mock-1.10.2/test_pytest_mock.py  2019-03-25 12:55:25.000000000 
+0100
+++ new/pytest-mock-1.10.3/test_pytest_mock.py  2019-03-30 14:26:09.000000000 
+0100
@@ -13,6 +13,9 @@
     platform.python_implementation() == "PyPy", reason="could not make work on 
pypy"
 )
 
+# Python 3.8 changed the output formatting (bpo-35500).
+PY38 = sys.version_info >= (3, 8)
+
 
 @pytest.fixture
 def needs_assert_rewrite(pytestconfig):
@@ -129,14 +132,26 @@
     assert x == {"new": 10}
 
 
-def test_deprecated_mock(mock, tmpdir):
+def test_deprecated_mock(testdir):
     """
     Use backward-compatibility-only mock fixture to ensure complete coverage.
     """
-    mock.patch("os.listdir", return_value=["mocked"])
-    assert os.listdir(str(tmpdir)) == ["mocked"]
-    mock.stopall()
-    assert os.listdir(str(tmpdir)) == []
+    p1 = testdir.makepyfile(
+        """
+        import os
+
+        def test(mock, tmpdir):
+            mock.patch("os.listdir", return_value=["mocked"])
+            assert os.listdir(str(tmpdir)) == ["mocked"]
+            mock.stopall()
+            assert os.listdir(str(tmpdir)) == []
+        """
+    )
+    result = testdir.runpytest(str(p1))
+    result.stdout.fnmatch_lines(
+        ['*DeprecationWarning: "mock" fixture has been deprecated, use 
"mocker"*']
+    )
+    assert result.ret == 0
 
 
 @pytest.mark.parametrize(
@@ -185,7 +200,7 @@
 
     def test_repr_with_no_name(self, mocker):
         stub = mocker.stub()
-        assert not "name" in repr(stub)
+        assert "name" not in repr(stub)
 
     def test_repr_with_name(self, mocker):
         test_name = "funny walk"
@@ -194,7 +209,11 @@
 
     def __test_failure_message(self, mocker, **kwargs):
         expected_name = kwargs.get("name") or "mock"
-        expected_message = "Expected call: {0}()\nNot 
called".format(expected_name)
+        if PY38:
+            msg = "expected call not found.\nExpected: {0}()\nActual: not 
called."
+        else:
+            msg = "Expected call: {0}()\nNot called"
+        expected_message = msg.format(expected_name)
         stub = mocker.stub(**kwargs)
         with pytest.raises(AssertionError) as exc_info:
             stub.assert_called_with()
@@ -585,22 +604,30 @@
     """
     )
     result = testdir.runpytest("-s")
-    result.stdout.fnmatch_lines(
-        [
+    if PY38:
+        expected_lines = [
+            "*AssertionError: expected call not found.",
+            "*Expected: mock('', bar=4)",
+            "*Actual: mock('fo')",
+        ]
+    else:
+        expected_lines = [
             "*AssertionError: Expected call: mock('', bar=4)*",
             "*Actual call: mock('fo')*",
-            "*pytest introspection follows:*",
-            "*Args:",
-            "*assert ('fo',) == ('',)",
-            "*At index 0 diff: 'fo' != ''*",
-            "*Use -v to get the full diff*",
-            "*Kwargs:*",
-            "*assert {} == {'bar': 4}*",
-            "*Right contains more items:*",
-            "*{'bar': 4}*",
-            "*Use -v to get the full diff*",
         ]
-    )
+    expected_lines += [
+        "*pytest introspection follows:*",
+        "*Args:",
+        "*assert ('fo',) == ('',)",
+        "*At index 0 diff: 'fo' != ''*",
+        "*Use -v to get the full diff*",
+        "*Kwargs:*",
+        "*assert {} == {'bar': 4}*",
+        "*Right contains more items:*",
+        "*{'bar': 4}*",
+        "*Use -v to get the full diff*",
+    ]
+    result.stdout.fnmatch_lines(expected_lines)
 
 
 def test_assert_called_with_unicode_arguments(mocker):
@@ -613,7 +640,7 @@
 
 
 def test_plain_stopall(testdir):
-    """Calling patch.stopall() in a test would cause an error during 
unconfigure (#137)"""
+    """patch.stopall() in a test should not cause an error during unconfigure 
(#137)"""
     testdir.makepyfile(
         """
         import random
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mock-1.10.2/tox.ini 
new/pytest-mock-1.10.3/tox.ini
--- old/pytest-mock-1.10.2/tox.ini      2019-03-25 12:55:25.000000000 +0100
+++ new/pytest-mock-1.10.3/tox.ini      2019-03-30 14:26:09.000000000 +0100
@@ -21,3 +21,6 @@
 
 [pytest]
 addopts = -ra
+
+[flake8]
+max-line-length = 88


Reply via email to