summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2020-02-04 02:56:23 +0100
committerGitHub <noreply@github.com>2020-02-04 02:56:23 +0100
commitaa0328782f9c92d7497ff28f77972afe3cb5b8e2 (patch)
treec5eeaa4aef5a2af57c355218bd22d4f1a43b670e /testing
parent1480aa31a76feef504f392e52f5730ee12476988 (diff)
downloadpytest-aa0328782f9c92d7497ff28f77972afe3cb5b8e2.tar.gz
assertion: save/restore hooks on item (#6646)
Diffstat (limited to 'testing')
-rw-r--r--testing/test_assertion.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/testing/test_assertion.py b/testing/test_assertion.py
index e975a3fea..dc260b39f 100644
--- a/testing/test_assertion.py
+++ b/testing/test_assertion.py
@@ -72,10 +72,19 @@ class TestImportHookInstallation:
result = testdir.runpytest_subprocess()
result.stdout.fnmatch_lines(
[
- "E * AssertionError: ([[][]], [[][]], [[]<TestReport *>[]])*",
- "E * assert"
- " {'failed': 1, 'passed': 0, 'skipped': 0} =="
- " {'failed': 0, 'passed': 1, 'skipped': 0}",
+ "> r.assertoutcome(passed=1)",
+ "E AssertionError: ([[][]], [[][]], [[]<TestReport *>[]])*",
+ "E assert {'failed': 1,... 'skipped': 0} == {'failed': 0,... 'skipped': 0}",
+ "E Omitting 1 identical items, use -vv to show",
+ "E Differing items:",
+ "E Use -v to get the full diff",
+ ]
+ )
+ # XXX: unstable output.
+ result.stdout.fnmatch_lines_random(
+ [
+ "E {'failed': 1} != {'failed': 0}",
+ "E {'passed': 0} != {'passed': 1}",
]
)