public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyongc] rawhide: Adapt tests for click 8.4
@ 2026-07-25  7:57 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-07-25  7:57 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pyongc
Branch : rawhide
Commit : 1eaf89561efcaad4f642cafbfd3d37db606c1eee
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-07-24T06:38:44+01:00
Stats  : +188/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyongc/c/1eaf89561efcaad4f642cafbfd3d37db606c1eee?branch=rawhide

Log:
Adapt tests for click 8.4

---
diff --git a/63.patch b/63.patch
new file mode 100644
index 0000000..d4f11e4
--- /dev/null
+++ b/63.patch
@@ -0,0 +1,184 @@
+From dd227f68a22d00b7f7b41564672a7957a1f5e9d2 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Fri, 24 Jul 2026 01:00:53 +0100
+Subject: [PATCH] Adapt tests for click 8.4
+
+These messages now have more ANSI escape sequences.
+
+Signed-off-by: Benjamin A. Beasley <code@musicinmybrain.net>
+---
+ tests/scripts/test_ongc.py | 51 +++++++++++++++++++++++++-------------
+ 1 file changed, 34 insertions(+), 17 deletions(-)
+
+diff --git a/tests/scripts/test_ongc.py b/tests/scripts/test_ongc.py
+index 02319bf..47f77dd 100644
+--- a/tests/scripts/test_ongc.py
++++ b/tests/scripts/test_ongc.py
+@@ -127,7 +127,8 @@ def test_neighbors_with_pager():
+     runner = CliRunner()
+     result = runner.invoke(ongc.neighbors, ['ngc1', '--radius=600'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert '\nNGC0001 neighbors from nearest to farthest:\n' not in result.output
+ 
+ 
+@@ -150,7 +151,8 @@ def test_search():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('UGC05470, Galaxy in Leo\n')
+ 
+ 
+@@ -158,7 +160,8 @@ def test_search_with_catalog_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--catalog=M'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('NGC0205, Galaxy in And\n')
+ 
+ 
+@@ -166,7 +169,8 @@ def test_search_with_type_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--type=*'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('NGC7830, Star in Psc\n')
+ 
+ 
+@@ -174,7 +178,8 @@ def test_search_with_multiple_types_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--type=*,**'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('M040, Double star in UMa\n')
+ 
+ 
+@@ -182,7 +187,8 @@ def test_search_with_constellation_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--constellation=aql'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('MWSC3171, Globular Cluster in Aql\n')
+ 
+ 
+@@ -190,7 +196,8 @@ def test_search_with_multiple_constellations_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--constellation=aql,cyg'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('MWSC3171, Globular Cluster in Aql\n')
+ 
+ 
+@@ -198,7 +205,8 @@ def test_search_with_minsize_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--minsize=5'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('UGC05470, Galaxy in Leo\n')
+ 
+ 
+@@ -206,7 +214,8 @@ def test_search_with_maxsize_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--maxsize=0.5'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('NGC5457, Galaxy in UMa\n')
+ 
+ 
+@@ -214,7 +223,8 @@ def test_search_with_uptobmag_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--uptobmag=8'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('Mel071, Open Cluster in Pup\n')
+ 
+ 
+@@ -222,7 +232,8 @@ def test_search_with_uptovmag_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--uptovmag=6'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('Mel022, Open Cluster in Tau\n')
+ 
+ 
+@@ -230,7 +241,8 @@ def test_search_with_minra_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--minra=23:52:00.00'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('H21, Open Cluster in Cas\n')
+ 
+ 
+@@ -238,7 +250,8 @@ def test_search_with_maxra_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--maxra=0:8:0'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('PGC000143, Galaxy in Cet\n')
+ 
+ 
+@@ -246,7 +259,8 @@ def test_search_with_minra_maxra_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--minra=23:56:0', '--maxra=0:4:0'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('PGC000143, Galaxy in Cet\n')
+ 
+ 
+@@ -268,7 +282,8 @@ def test_search_with_mindec_maxdec_filter():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--mindec=-1:00:00', '--maxdec=+1:0:0'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('NGC7787, Galaxy in Psc\n')
+ 
+ 
+@@ -334,7 +349,8 @@ def test_search_with_pager():
+     runner = CliRunner()
+     result = runner.invoke(ongc.search, ['--catalog=M'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert result.output.endswith('NGC0205, Galaxy in And\n')
+ 
+ 
+@@ -401,5 +417,6 @@ def test_nearby_with_pager():
+     runner = CliRunner()
+     result = runner.invoke(ongc.nearby, ['11:08:44', '-00:09:01.3', '--radius=600'], input='y')
+     assert result.exit_code == 0
+-    assert 'WARNING: the result list is long. Do you want to see it via a pager?' in result.output
++    assert 'WARNING:' in result.output
++    assert 'the result list is long. Do you want to see it via a pager?' in result.output
+     assert '\nObjects in proximity of 11:08:44 -00:09:01.3' not in result.output

diff --git a/python-pyongc.spec b/python-pyongc.spec
index 035f3fc..0684256 100644
--- a/python-pyongc.spec
+++ b/python-pyongc.spec
@@ -9,6 +9,10 @@ License:        MIT AND CC-BY-SA-4.0
 URL:            https://pypi.python.org/pypi/PyOngc
 Source:         %{pypi_source pyongc}
 
+# Adapt tests for click 8.4
+# https://github.com/mattiaverga/PyOngc/pull/63
+Patch:          https://github.com/mattiaverga/PyOngc/pull/63.patch
+
 BuildArch:      noarch
 BuildRequires:  python3-devel
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-25  7:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-25  7:57 [rpms/python-pyongc] rawhide: Adapt tests for click 8.4 Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox