python-pytest-mock/pytest-mock-issue272-asyncio.patch
2023-06-28 18:23:10 +08:00

62 lines
2.1 KiB
Diff

From 18f6ba2f7733e0145c87038bed8e1f95b1125e56 Mon Sep 17 00:00:00 2001
From: li-miaomiao_zhr <mmlidc@isoftstone.com>
Date: Wed, 28 Jun 2023 15:08:15 +0800
Subject: [PATCH] pytest mock issue272 asyncio
---
tests/test_pytest_mock.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py
index 3d53241..5e3ac7b 100644
--- a/tests/test_pytest_mock.py
+++ b/tests/test_pytest_mock.py
@@ -948,7 +948,7 @@ def test_plain_stopall(testdir: Any) -> None:
"""
)
result = testdir.runpytest_subprocess()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
assert "RuntimeError" not in result.stderr.str()
@@ -1093,7 +1093,7 @@ def test_used_with_class_scope(testdir: Any) -> None:
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
def test_used_with_module_scope(testdir: Any) -> None:
@@ -1121,7 +1121,7 @@ def test_used_with_module_scope(testdir: Any) -> None:
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
def test_used_with_package_scope(testdir: Any) -> None:
@@ -1149,7 +1149,7 @@ def test_used_with_package_scope(testdir: Any) -> None:
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
def test_used_with_session_scope(testdir: Any) -> None:
@@ -1177,7 +1177,7 @@ def test_used_with_session_scope(testdir: Any) -> None:
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
def test_stop_patch(mocker):
--
2.39.1