mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-pytest: Fix failing test_raising_repr.
* gnu/packages/patches/pytest-fix-unstrable-exception-test.patch: Add new patch from upstream. * gnu/packages/check.scm (python-pytest): Use it. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
d16538c935
commit
df6848565a
3 changed files with 37 additions and 1 deletions
|
@ -0,0 +1,34 @@
|
|||
From b55e264a675f7621b8351e227b93742f19e01c7d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Valenzuela <dsvalenzuela@uc.cl>
|
||||
Date: Wed, 9 Nov 2022 19:43:10 -0300
|
||||
Subject: [PATCH] Fix test_raising_repr test
|
||||
|
||||
Closes #10473
|
||||
|
||||
Python <3.11 versions depend on `exceptiongroup>=1.0.0rc8`, and they released version `1.0.1`
|
||||
6 days ago (2022/11/03) that as a side-effect changed the output of exceptions.
|
||||
---
|
||||
testing/test_assertion.py | 10 +---------
|
||||
1 file changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/testing/test_assertion.py b/testing/test_assertion.py
|
||||
index d8844f2e41..7574592210 100644
|
||||
--- a/testing/test_assertion.py
|
||||
+++ b/testing/test_assertion.py
|
||||
@@ -1664,15 +1664,7 @@ def test_raising_repr():
|
||||
"""
|
||||
)
|
||||
result = pytester.runpytest()
|
||||
- if sys.version_info >= (3, 11):
|
||||
- # python 3.11 has native support for un-str-able exceptions
|
||||
- result.stdout.fnmatch_lines(
|
||||
- ["E AssertionError: <exception str() failed>"]
|
||||
- )
|
||||
- else:
|
||||
- result.stdout.fnmatch_lines(
|
||||
- ["E AssertionError: <unprintable AssertionError object>"]
|
||||
- )
|
||||
+ result.stdout.fnmatch_lines(["E AssertionError: <exception str() failed>"])
|
||||
|
||||
|
||||
def test_issue_1944(pytester: Pytester) -> None:
|
Loading…
Add table
Add a link
Reference in a new issue