--- Begin Message ---
Source: python-pytest-asyncio, pytest-mock
Control: found -1 python-pytest-asyncio/0.18.1-1
Control: found -1 pytest-mock/3.6.1-1
Severity: serious
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: breaks needs-update
Dear maintainer(s),
With a recent upload of python-pytest-asyncio the autopkgtest of
pytest-mock fails in testing when that autopkgtest is run with the
binary packages of python-pytest-asyncio from unstable. It passes when
run with only packages from testing. In tabular form:
pass fail
python-pytest-asyncio from testing 0.18.1-1
pytest-mock from testing 3.6.1-1
all others from testing from testing
I copied some of the output at the bottom of this report.
Currently this regression is blocking the migration of
python-pytest-asyncio to testing [1]. Due to the nature of this issue, I
filed this bug report against both packages. Can you please investigate
the situation and reassign the bug to the right package?
More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
Paul
[1] https://qa.debian.org/excuses.php?package=python-pytest-asyncio
https://ci.debian.net/data/autopkgtest/testing/amd64/p/pytest-mock/19680464/log.gz
=================================== FAILURES
===================================
______________________________ test_plain_stopall
______________________________
testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_plain_stopall0')>
def test_plain_stopall(testdir: Any) -> None:
"""patch.stopall() in a test should not cause an error during
unconfigure (#137)"""
testdir.makepyfile(
"""
import random
def get_random_number():
return random.randint(0, 100)
def test_get_random_number(mocker):
patcher = mocker.mock_module.patch("random.randint",
lambda x, y: 5)
patcher.start()
assert get_random_number() == 5
mocker.mock_module.patch.stopall()
"""
)
result = testdir.runpytest_subprocess()
result.stdout.fnmatch_lines("* 1 passed in *")
E Failed: nomatch: '* 1 passed in *'
E and: '============================= test session starts
=============================='
E and: 'platform linux -- Python 3.10.2, pytest-6.2.5,
py-1.10.0, pluggy-0.13.0'
E and: 'rootdir:
/tmp/pytest-of-debci/pytest-0/test_plain_stopall0'
E and: 'plugins: asyncio-0.18.1, mock-3.6.1'
E and: 'asyncio: mode=legacy'
E and: 'collected 1 item'
E and: ''
E and: 'test_plain_stopall.py .
[100%]'
E and: ''
E and: '=============================== warnings summary
==============================='
E and:
'../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191'
E and: "
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file."
E and: ' config.issue_config_time_warning(LEGACY_MODE,
stacklevel=2)'
E and: ''
E and: '-- Docs: https://docs.pytest.org/en/stable/warnings.html'
E and: '========================= 1 passed, 1 warning in 0.02s
========================='
E remains unmatched: '* 1 passed in *'
/tmp/autopkgtest-lxc.p64demaa/downtmp/autopkgtest_tmp/tests/test_pytest_mock.py:842:
Failed
----------------------------- Captured stdout call
-----------------------------
running: /usr/bin/python3.10 -mpytest
--basetemp=/tmp/pytest-of-debci/pytest-0/test_plain_stopall0/runpytest-0
in: /tmp/pytest-of-debci/pytest-0/test_plain_stopall0
============================= test session starts
==============================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/pytest-of-debci/pytest-0/test_plain_stopall0
plugins: asyncio-0.18.1, mock-3.6.1
asyncio: mode=legacy
collected 1 item
test_plain_stopall.py .
[100%]
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================= 1 passed, 1 warning in 0.02s
=========================
__________________________ test_used_with_class_scope
__________________________
testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_used_with_class_scope0')>
def test_used_with_class_scope(testdir: Any) -> None:
testdir.makepyfile(
"""
import pytest
import random
import unittest
def get_random_number():
return random.randint(0, 1)
@pytest.fixture(autouse=True, scope="class")
def randint_mock(class_mocker):
return class_mocker.patch("random.randint", lambda x, y: 5)
class TestGetRandomNumber(unittest.TestCase):
def test_get_random_number(self):
assert get_random_number() == 5
"""
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
result.stdout.fnmatch_lines("* 1 passed in *")
E Failed: nomatch: '* 1 passed in *'
E and: '============================= test session starts
=============================='
E and: 'platform linux -- Python 3.10.2, pytest-6.2.5,
py-1.10.0, pluggy-0.13.0'
E and: 'rootdir:
/tmp/pytest-of-debci/pytest-0/test_used_with_class_scope0'
E and: 'plugins: asyncio-0.18.1, mock-3.6.1'
E and: 'asyncio: mode=legacy'
E and: 'collected 1 item'
E and: ''
E and: 'test_used_with_class_scope.py .
[100%]'
E and: ''
E and: '=============================== warnings summary
==============================='
E and:
'../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191'
E and: "
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file."
E and: ' config.issue_config_time_warning(LEGACY_MODE,
stacklevel=2)'
E and: ''
E and: '-- Docs: https://docs.pytest.org/en/stable/warnings.html'
E and: '========================= 1 passed, 1 warning in 0.02s
========================='
E remains unmatched: '* 1 passed in *'
/tmp/autopkgtest-lxc.p64demaa/downtmp/autopkgtest_tmp/tests/test_pytest_mock.py:981:
Failed
----------------------------- Captured stdout call
-----------------------------
running: /usr/bin/python3.10 -mpytest
--basetemp=/tmp/pytest-of-debci/pytest-0/test_used_with_class_scope0/runpytest-0
in: /tmp/pytest-of-debci/pytest-0/test_used_with_class_scope0
============================= test session starts
==============================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/pytest-of-debci/pytest-0/test_used_with_class_scope0
plugins: asyncio-0.18.1, mock-3.6.1
asyncio: mode=legacy
collected 1 item
test_used_with_class_scope.py .
[100%]
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================= 1 passed, 1 warning in 0.02s
=========================
_________________________ test_used_with_module_scope
__________________________
testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_used_with_module_scope0')>
def test_used_with_module_scope(testdir: Any) -> None:
testdir.makepyfile(
"""
import pytest
import random
def get_random_number():
return random.randint(0, 1)
@pytest.fixture(autouse=True, scope="module")
def randint_mock(module_mocker):
return module_mocker.patch("random.randint", lambda x,
y: 5)
def test_get_random_number():
assert get_random_number() == 5
"""
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
result.stdout.fnmatch_lines("* 1 passed in *")
E Failed: nomatch: '* 1 passed in *'
E and: '============================= test session starts
=============================='
E and: 'platform linux -- Python 3.10.2, pytest-6.2.5,
py-1.10.0, pluggy-0.13.0'
E and: 'rootdir:
/tmp/pytest-of-debci/pytest-0/test_used_with_module_scope0'
E and: 'plugins: asyncio-0.18.1, mock-3.6.1'
E and: 'asyncio: mode=legacy'
E and: 'collected 1 item'
E and: ''
E and: 'test_used_with_module_scope.py .
[100%]'
E and: ''
E and: '=============================== warnings summary
==============================='
E and:
'../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191'
E and: "
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file."
E and: ' config.issue_config_time_warning(LEGACY_MODE,
stacklevel=2)'
E and: ''
E and: '-- Docs: https://docs.pytest.org/en/stable/warnings.html'
E and: '========================= 1 passed, 1 warning in 0.02s
========================='
E remains unmatched: '* 1 passed in *'
/tmp/autopkgtest-lxc.p64demaa/downtmp/autopkgtest_tmp/tests/test_pytest_mock.py:1003:
Failed
----------------------------- Captured stdout call
-----------------------------
running: /usr/bin/python3.10 -mpytest
--basetemp=/tmp/pytest-of-debci/pytest-0/test_used_with_module_scope0/runpytest-0
in: /tmp/pytest-of-debci/pytest-0/test_used_with_module_scope0
============================= test session starts
==============================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/pytest-of-debci/pytest-0/test_used_with_module_scope0
plugins: asyncio-0.18.1, mock-3.6.1
asyncio: mode=legacy
collected 1 item
test_used_with_module_scope.py .
[100%]
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================= 1 passed, 1 warning in 0.02s
=========================
_________________________ test_used_with_package_scope
_________________________
testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_used_with_package_scope0')>
def test_used_with_package_scope(testdir: Any) -> None:
"""..."""
testdir.makepyfile(
"""
import pytest
import random
def get_random_number():
return random.randint(0, 1)
@pytest.fixture(autouse=True, scope="package")
def randint_mock(package_mocker):
return package_mocker.patch("random.randint", lambda x,
y: 5)
def test_get_random_number():
assert get_random_number() == 5
"""
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
result.stdout.fnmatch_lines("* 1 passed in *")
E Failed: nomatch: '* 1 passed in *'
E and: '============================= test session starts
=============================='
E and: 'platform linux -- Python 3.10.2, pytest-6.2.5,
py-1.10.0, pluggy-0.13.0'
E and: 'rootdir:
/tmp/pytest-of-debci/pytest-0/test_used_with_package_scope0'
E and: 'plugins: asyncio-0.18.1, mock-3.6.1'
E and: 'asyncio: mode=legacy'
E and: 'collected 1 item'
E and: ''
E and: 'test_used_with_package_scope.py .
[100%]'
E and: ''
E and: '=============================== warnings summary
==============================='
E and:
'../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191'
E and: "
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file."
E and: ' config.issue_config_time_warning(LEGACY_MODE,
stacklevel=2)'
E and: ''
E and: '-- Docs: https://docs.pytest.org/en/stable/warnings.html'
E and: '========================= 1 passed, 1 warning in 0.02s
========================='
E remains unmatched: '* 1 passed in *'
/tmp/autopkgtest-lxc.p64demaa/downtmp/autopkgtest_tmp/tests/test_pytest_mock.py:1026:
Failed
----------------------------- Captured stdout call
-----------------------------
running: /usr/bin/python3.10 -mpytest
--basetemp=/tmp/pytest-of-debci/pytest-0/test_used_with_package_scope0/runpytest-0
in: /tmp/pytest-of-debci/pytest-0/test_used_with_package_scope0
============================= test session starts
==============================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/pytest-of-debci/pytest-0/test_used_with_package_scope0
plugins: asyncio-0.18.1, mock-3.6.1
asyncio: mode=legacy
collected 1 item
test_used_with_package_scope.py .
[100%]
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================= 1 passed, 1 warning in 0.02s
=========================
_________________________ test_used_with_session_scope
_________________________
testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_used_with_session_scope0')>
def test_used_with_session_scope(testdir: Any) -> None:
"""..."""
testdir.makepyfile(
"""
import pytest
import random
def get_random_number():
return random.randint(0, 1)
@pytest.fixture(autouse=True, scope="session")
def randint_mock(session_mocker):
return session_mocker.patch("random.randint", lambda x,
y: 5)
def test_get_random_number():
assert get_random_number() == 5
"""
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
result.stdout.fnmatch_lines("* 1 passed in *")
E Failed: nomatch: '* 1 passed in *'
E and: '============================= test session starts
=============================='
E and: 'platform linux -- Python 3.10.2, pytest-6.2.5,
py-1.10.0, pluggy-0.13.0'
E and: 'rootdir:
/tmp/pytest-of-debci/pytest-0/test_used_with_session_scope0'
E and: 'plugins: asyncio-0.18.1, mock-3.6.1'
E and: 'asyncio: mode=legacy'
E and: 'collected 1 item'
E and: ''
E and: 'test_used_with_session_scope.py .
[100%]'
E and: ''
E and: '=============================== warnings summary
==============================='
E and:
'../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191'
E and: "
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file."
E and: ' config.issue_config_time_warning(LEGACY_MODE,
stacklevel=2)'
E and: ''
E and: '-- Docs: https://docs.pytest.org/en/stable/warnings.html'
E and: '========================= 1 passed, 1 warning in 0.02s
========================='
E remains unmatched: '* 1 passed in *'
/tmp/autopkgtest-lxc.p64demaa/downtmp/autopkgtest_tmp/tests/test_pytest_mock.py:1049:
Failed
----------------------------- Captured stdout call
-----------------------------
running: /usr/bin/python3.10 -mpytest
--basetemp=/tmp/pytest-of-debci/pytest-0/test_used_with_session_scope0/runpytest-0
in: /tmp/pytest-of-debci/pytest-0/test_used_with_session_scope0
============================= test session starts
==============================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/pytest-of-debci/pytest-0/test_used_with_session_scope0
plugins: asyncio-0.18.1, mock-3.6.1
asyncio: mode=legacy
collected 1 item
test_used_with_session_scope.py .
[100%]
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================= 1 passed, 1 warning in 0.02s
=========================
=============================== warnings summary
===============================
../../../../usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:191:
DeprecationWarning: The 'asyncio_mode' default value will change to
'strict' in future, please explicitly use 'asyncio_mode=strict' or
'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info
============================
FAILED tests/test_pytest_mock.py::test_plain_stopall - Failed: nomatch:
'* 1 ...
FAILED tests/test_pytest_mock.py::test_used_with_class_scope - Failed:
nomatc...
FAILED tests/test_pytest_mock.py::test_used_with_module_scope - Failed:
nomat...
FAILED tests/test_pytest_mock.py::test_used_with_package_scope - Failed:
noma...
FAILED tests/test_pytest_mock.py::test_used_with_session_scope - Failed:
noma...
============== 5 failed, 63 passed, 4 skipped, 1 warning in 3.59s
==============
autopkgtest [16:11:59]: test command1
OpenPGP_signature
Description: OpenPGP digital signature
--- End Message ---