From: Josselin Poiret <dev@jpoiret.xyz>
To: Andreas Enge <andreas@enge.fr>, Kaelyn <kaelyn.alexi@protonmail.com>
Cc: guix-devel <guix-devel@gnu.org>, Josselin Poiret <dev@jpoiret.xyz>
Subject: [PATCH core-updates] gnu: python-pytest: Fix failing test_raising_repr.
Date: Sat, 15 Apr 2023 16:08:18 +0200 [thread overview]
Message-ID: <bdb502fc15b3c438ca754e390a9ceab9d31e18b0.1681567617.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <ZDqLP4NxkctcWkq0@jurong>
* 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.
---
Hey Andreas and Kaelyn,
This should also fix it without bumping python-pytest to a new version (since it
has so many dependents, don't want to introduce new breakage now).
Best,
Josselin
gnu/local.mk | 1 +
gnu/packages/check.scm | 3 +-
.../pytest-fix-unstrable-exception-test.patch | 34 +++++++++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/pytest-fix-unstrable-exception-test.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index e29e09b688..73756a8c49 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1730,6 +1730,7 @@ dist_patch_DATA = \
%D%/packages/patches/pybugz-stty.patch \
%D%/packages/patches/pygpgme-disable-problematic-tests.patch \
%D%/packages/patches/pyqt-configure.patch \
+ %D%/packages/patches/pytest-fix-unstrable-exception-test.patch \
%D%/packages/patches/python-2-deterministic-build-info.patch \
%D%/packages/patches/python-2.7-adjust-tests.patch \
%D%/packages/patches/python-2.7-expat-compat.patch \
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index f388eb82a7..d072edbf51 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1253,7 +1253,8 @@ (define-public python-pytest
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
+ "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))
+ (patches (search-patches "pytest-fix-unstrable-exception-test.patch"))))
(build-system python-build-system)
(arguments
(list
diff --git a/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch b/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch
new file mode 100644
index 0000000000..4d77786b77
--- /dev/null
+++ b/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch
@@ -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:
base-commit: 7ccf9943029747d4ba97160214f895b365511278
--
2.39.2
next prev parent reply other threads:[~2023-04-15 14:09 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 16:11 i686 core-updates failure Kaelyn
2023-04-12 21:05 ` Josselin Poiret
2023-04-12 21:31 ` Andreas Enge
2023-04-13 4:37 ` Kaelyn
2023-04-13 16:25 ` Andreas Enge
2023-04-14 8:28 ` Andreas Enge
2023-04-14 20:05 ` Kaelyn
2023-04-15 11:20 ` python-pytest on core-updates (was: i686 core-updates failure.) Andreas Enge
2023-04-15 11:32 ` python-pytest on core-updates Andreas Enge
2023-04-15 14:08 ` Josselin Poiret [this message]
2023-04-15 16:14 ` [PATCH core-updates] gnu: python-pytest: Fix failing test_raising_repr Kaelyn
2023-04-15 19:59 ` Andreas Enge
2023-04-15 20:47 ` Andreas Enge
2023-04-15 20:49 ` python-pytest on core-updates (was: i686 core-updates failure.) Andreas Enge
2023-04-13 9:18 ` i686 core-updates failure Simon Tournier
2023-04-13 13:23 ` jgart
2023-04-13 13:43 ` Andreas Enge
2023-04-14 15:12 ` Csepp
2023-04-14 16:58 ` Simon Tournier
2023-04-14 17:30 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-04-13 15:31 ` Simon Tournier
2023-04-13 16:21 ` Simon Tournier
2023-04-13 15:47 ` Ricardo Wurmus
2023-04-13 16:15 ` Greg Hogan
2023-04-13 16:39 ` Simon Tournier
2023-04-13 16:47 ` Ricardo Wurmus
2023-04-13 20:02 ` Lars-Dominik Braun
2023-04-13 20:15 ` Simon Tournier
2023-04-13 20:45 ` Andreas Enge
2023-04-13 20:57 ` Simon Tournier
2023-04-14 8:25 ` Andreas Enge
2023-04-14 9:45 ` Simon Tournier
2023-04-14 18:16 ` Andreas Enge
2023-04-14 18:40 ` Lars-Dominik Braun
2023-04-15 9:48 ` ghc in core-updates on i686 Andreas Enge
2023-04-14 10:49 ` i686 core-updates failure Lars-Dominik Braun
2023-04-14 17:00 ` Simon Tournier
2023-04-13 20:33 ` wget (was Re: i686 core-updates failure.) Simon Tournier
2023-04-13 20:37 ` Andreas Enge
2023-04-13 20:43 ` Simon Tournier
2023-04-13 20:49 ` wget Andreas Enge
2023-04-15 0:51 ` wget (was Re: i686 core-updates failure.) Maxim Cournoyer
2023-04-15 10:43 ` Andreas Enge
2023-04-15 16:37 ` Kaelyn
2023-04-15 18:25 ` Kaelyn
2023-04-15 21:00 ` wget on i686 in core-updates Andreas Enge
2023-04-16 17:06 ` wget (was Re: i686 core-updates failure.) Andreas Enge
2023-04-16 17:49 ` Kaelyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdb502fc15b3c438ca754e390a9ceab9d31e18b0.1681567617.git.dev@jpoiret.xyz \
--to=dev@jpoiret.xyz \
--cc=andreas@enge.fr \
--cc=guix-devel@gnu.org \
--cc=kaelyn.alexi@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.