public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-toml-cli] rawhide: Fix test compatibility with Click 8.2+ / Typer 0.16.0+ where
Date: Wed, 05 Aug 2026 23:59:28 GMT	[thread overview]
Message-ID: <178597436815.1.3493798671604236650.rpms-python-toml-cli-2d507e59160a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-toml-cli
            Branch : rawhide
            Commit : 2d507e59160a029eb052f57ac91009deecb5de5c
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-07-28T00:19:03-03:00
            Stats  : +24/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-toml-cli/c/2d507e59160a029eb052f57ac91009deecb5de5c?branch=rawhide

            Log:
            Fix test compatibility with Click 8.2+ / Typer 0.16.0+ where
CliRunner separates stdout/stderr and no-args-is-help returns exit code 2

Resolves: rhbz#2466662

---
diff --git a/0001-fix-tests-click-typer-compatibility.patch b/0001-fix-tests-click-typer-compatibility.patch
new file mode 100644
index 0000000..c8f6a11
--- /dev/null
+++ b/0001-fix-tests-click-typer-compatibility.patch
@@ -0,0 +1,21 @@
+diff -urN a/tests/toml_cli/test_init.py b/tests/toml_cli/test_init.py
+--- a/tests/toml_cli/test_init.py	2023-01-20 18:23:45.000000000 +0000
++++ b/tests/toml_cli/test_init.py	2026-07-28 00:00:00.000000000 +0000
+@@ -46,7 +46,7 @@
+     def get(args, exit_code=0):
+         result = runner.invoke(app, args)
+         assert result.exit_code == exit_code
+-        return result.stdout.strip()
++        return result.output.strip()
+ 
+     assert get(["get", "--toml-path", str(test_toml_path), "person"]) == (
+         "{'name': 'MyName', 'age': 12, 'happy': False, "
+@@ -215,7 +215,7 @@
+ 
+ def test_no_command():
+     result = runner.invoke(app, [])
+-    assert result.exit_code == 0
++    assert result.exit_code in (0, 2)
+     assert "--help" in result.stdout
+     assert "Commands" in result.stdout
+     assert "Commands" in result.stdout

diff --git a/python-toml-cli.spec b/python-toml-cli.spec
index 8938a2c..51685ea 100644
--- a/python-toml-cli.spec
+++ b/python-toml-cli.spec
@@ -7,6 +7,9 @@ License:        MIT
 URL:            https://github.com/mrijken/toml-cli
 # PyPI tarball doesn't include tests
 Source:         %{url}/archive/v%{version}/toml-cli-%{version}.tar.gz
+# Fix test compatibility with Click 8.2+ / Typer 0.16.0+ where
+# CliRunner separates stdout/stderr and no-args-is-help returns exit code 2
+Patch:          0001-fix-tests-click-typer-compatibility.patch
 
 BuildArch:      noarch
 BuildRequires:  python3-devel

                 reply	other threads:[~2026-08-05 23:59 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=178597436815.1.3493798671604236650.rpms-python-toml-cli-2d507e59160a@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=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