public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/reuse] epel10: Make tests compatible with click 8.2 (rhbz#2378887)
Date: Wed, 19 Aug 2026 12:50:31 GMT	[thread overview]
Message-ID: <178714383143.1.15384774577097299879.rpms-reuse-9b1c8329a95d@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-08-19 12:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178714383143.1.15384774577097299879.rpms-reuse-9b1c8329a95d@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox