public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/reuse] epel10: Make tests compatible with click 8.2 (rhbz#2378887)
@ 2026-08-19 12:50
0 siblings, 0 replies; only message in thread
From: @ 2026-08-19 12:50 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/reuse
Branch : epel10
Commit : 9b1c8329a95d9c399d3ab538b454f67bbb493f68
Author : Jan Staněk <jstanek@redhat.com>
Date : 2025-07-15T14:13:38+02:00
Stats : +34/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/reuse/c/9b1c8329a95d9c399d3ab538b454f67bbb493f68?branch=epel10
Log:
Make tests compatible with click 8.2 (rhbz#2378887)
---
diff --git a/0003-Prepare-test_cli_main.py-for-click-8.2.patch b/0003-Prepare-test_cli_main.py-for-click-8.2.patch
new file mode 100644
index 0000000..c2d9d57
--- /dev/null
+++ b/0003-Prepare-test_cli_main.py-for-click-8.2.patch
@@ -0,0 +1,33 @@
+From 2f7c59571370e7f2eb56920f1713410f1881e78f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= <jstanek@redhat.com>
+Date: Tue, 15 Jul 2025 12:21:21 +0200
+Subject: [PATCH] Prepare test_cli_main.py for click 8.2
+
+In click version 8.2.0, when displaying the help because no sub-command
+or option was specified, the exit code changed from 0 to 2 [1].
+
+[1]: https://github.com/pallets/click/pull/1489
+
+Signed-off-by: rpm-build <rpm-build>
+---
+ tests/test_cli_main.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_cli_main.py b/tests/test_cli_main.py
+index 641dd5e..9673848 100644
+--- a/tests/test_cli_main.py
++++ b/tests/test_cli_main.py
+@@ -19,7 +19,9 @@ class TestMain:
+ without_help = CliRunner().invoke(main, [])
+ with_help = CliRunner().invoke(main, ["--help"])
+ assert without_help.output == with_help.output
+- assert without_help.exit_code == with_help.exit_code == 0
++ # click changed the return value in 8.2
++ assert without_help.exit_code in {0, 2}
++ assert with_help.exit_code == 0
+ assert with_help.output.startswith("Usage: reuse")
+
+ def test_version(self):
+--
+2.50.1
+
diff --git a/reuse.spec b/reuse.spec
index 07161a9..7c7337e 100644
--- a/reuse.spec
+++ b/reuse.spec
@@ -10,6 +10,7 @@ Source0: %pypi_source
Patch: 0001-Use-importlib-mode-for-pytest.patch
Patch: 0002-Skip-tests-with-old-freezegun.patch
+Patch: 0003-Prepare-test_cli_main.py-for-click-8.2.patch
# Build
BuildRequires: python3-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-19 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19 12:50 [rpms/reuse] epel10: Make tests compatible with click 8.2 (rhbz#2378887)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox