public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-toml-cli] rawhide: Fix test compatibility with Click 8.2+ / Typer 0.16.0+ where
@ 2026-08-05 23:59 Filipe Rosset
0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-05 23:59 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-05 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 23:59 [rpms/python-toml-cli] rawhide: Fix test compatibility with Click 8.2+ / Typer 0.16.0+ where Filipe Rosset
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox