public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Matthias Dellweg <x9c4@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pulp-cli] rawhide: Remove subtest workaround
Date: Mon, 08 Jun 2026 15:08:48 GMT [thread overview]
Message-ID: <178093132833.1.7707296726212945414.rpms-pulp-cli-5c597d21ca43@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/pulp-cli
Branch : rawhide
Commit : 5c597d21ca43349d98f4c2630cb5bf754b3cf3d7
Author : Matthias Dellweg <x9c4@redhat.com>
Date : 2026-06-08T15:08:25+00:00
Stats : +0/-103 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/pulp-cli/c/5c597d21ca43349d98f4c2630cb5bf754b3cf3d7?branch=rawhide
Log:
Remove subtest workaround
It was cherry-picked from this upstream version anyway.
---
diff --git a/fix-pytest9-remove-subtests.patch b/fix-pytest9-remove-subtests.patch
deleted file mode 100644
index 119894f..0000000
--- a/fix-pytest9-remove-subtests.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From f15c10294e65cadd78cd753dc7cea974e481adc3 Mon Sep 17 00:00:00 2001
-From: Matthias Dellweg <mdellweg@redhat.com>
-Date: Mon, 13 Apr 2026 15:02:40 +0200
-Subject: [PATCH] Stop using subtests
-
-Made-with: Cursor
----
- test_requirements.txt | 1 -
- tests/test_help_pages.py | 43 ++++++++++++++++++++++------------------
- 2 files changed, 24 insertions(+), 20 deletions(-)
-
-diff --git a/test_requirements.txt b/test_requirements.txt
-index 392abb9..7ee0ca6 100644
---- a/test_requirements.txt
-+++ b/test_requirements.txt
-@@ -1,6 +1,5 @@
- # Test requirements
- pytest>=7.0.0,<9.1
--pytest-subtests>=0.12.0,<0.16
- python-gnupg>=0.5.0,<0.6
- trustme>=1.1.0,<1.3
- jinja2>=3.1.4,<3.2
-diff --git a/tests/test_help_pages.py b/tests/test_help_pages.py
-index 5ca7a58..370f0aa 100644
---- a/tests/test_help_pages.py
-+++ b/tests/test_help_pages.py
-@@ -4,7 +4,6 @@ from functools import reduce
- import click
- import pytest
- from click.testing import CliRunner
--from pytest_subtests.plugin import SubTests
-
- from pulp_cli import load_plugins, main
-
-@@ -30,6 +29,12 @@ def traverse_commands(command: click.Command, args: t.List[str]) -> t.Iterator[t
- yield from traverse_commands(sub, args + ["--type", context_type, name])
-
-
-+def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
-+ m = next(metafunc.definition.iter_markers("help_page"), None)
-+ if m is not None and "base_cmd" in m.kwargs:
-+ metafunc.parametrize("args", traverse_commands(main, m.kwargs["base_cmd"]), ids=" ".join)
-+
-+
- @pytest.fixture
- def no_api(monkeypatch: pytest.MonkeyPatch) -> None:
- @property # type: ignore
-@@ -39,30 +44,30 @@ def no_api(monkeypatch: pytest.MonkeyPatch) -> None:
- monkeypatch.setattr("pulp_glue.common.context.PulpContext.api", getter)
-
-
--@pytest.mark.help_page
--def test_access_help(no_api: None, subtests: SubTests) -> None:
-- """Test, that all help screens are accessible without touching the api property."""
-+@pytest.mark.help_page(base_cmd=[])
-+def test_accessing_the_help_page_does_not_invoke_api(
-+ no_api: None,
-+ args: list[str],
-+) -> None:
- runner = CliRunner()
-- for args in traverse_commands(main, []):
-- with subtests.test(msg=" ".join(args)):
-- result = runner.invoke(main, args + ["--help"], catch_exceptions=False)
--
-- if result.exit_code == 2:
-- assert (
-- "not available in this context" in result.stdout
-- or "not available in this context" in result.stderr
-- )
-- else:
-- assert result.exit_code == 0
-- assert result.stdout.startswith("Usage:") or result.stdout.startswith(
-- "DeprecationWarning:"
-- )
-+ result = runner.invoke(main, args + ["--help"], catch_exceptions=False)
-+
-+ if result.exit_code == 2:
-+ assert (
-+ "not available in this context" in result.stdout
-+ or "not available in this context" in result.stderr
-+ )
-+ else:
-+ assert result.exit_code == 0
-+ assert result.stdout.startswith("Usage:") or result.stdout.startswith(
-+ "DeprecationWarning:"
-+ )
-
-
- @pytest.mark.parametrize(
- "command,options",
- [
-- (
-+ pytest.param(
- [
- "file",
- "repository",
---
-2.53.0
-
diff --git a/pulp-cli.spec b/pulp-cli.spec
index 8a02102..9b6903c 100644
--- a/pulp-cli.spec
+++ b/pulp-cli.spec
@@ -15,10 +15,6 @@ BuildArch: noarch
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
-# Remove pytest-subtests dependency and replace with pytest parametrize
-# https://github.com/pulp/pulp-cli/commit/7b4a185
-Patch: fix-pytest9-remove-subtests.patch
-
BuildRequires: python3-devel
Recommends: pulp-cli-deb
reply other threads:[~2026-06-08 15:08 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=178093132833.1.7707296726212945414.rpms-pulp-cli-5c597d21ca43@fedoraproject.org \
--to=x9c4@redhat.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