From 8b2f953cf3ca15191b5a8f237f89a3f906f9bdb2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 7 Jul 2025 21:37:30 -0400 Subject: [PATCH] Adjust style according to personal preference [skip changelog] --- python-pytest-subtests.spec | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/python-pytest-subtests.spec b/python-pytest-subtests.spec index 0b602d1..34dd626 100644 --- a/python-pytest-subtests.spec +++ b/python-pytest-subtests.spec @@ -1,6 +1,4 @@ -%global pypi_name pytest-subtests - -Name: python-%{pypi_name} +Name: python-pytest-subtests Version: 0.13.1 Release: %autorelease Summary: Support for unittest subTest() and subtests fixture @@ -8,45 +6,54 @@ Summary: Support for unittest subTest() and subtests fixture # SPDX License: MIT URL: https://github.com/pytest-dev/pytest-subtests -Source0: %{pypi_source pytest_subtests} +Source: %{pypi_source pytest_subtests} + BuildArch: noarch +BuildRequires: python3-devel + %description pytest-subtests unittest subTest() support and subtests fixture. -%package -n python3-%{pypi_name} + +%package -n python3-pytest-subtests Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3dist(pytest) +%description -n python3-pytest-subtests +%{summary}. -%{?python_provide:%python_provide python3-%{pypi_name}} - -%description -n python3-%{pypi_name} -pytest-subtests unittest subTest() support and subtests fixture. %prep %autosetup -n pytest_subtests-%{version} + %generate_buildrequires -%pyproject_buildrequires -r +%pyproject_buildrequires + %build %pyproject_wheel + %install %pyproject_install %pyproject_save_files pytest_subtests + %check # https://github.com/pytest-dev/pytest-subtests/issues/21 -PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=%{buildroot}%{python3_sitelib} \ - pytest-%{python3_version} -v tests \ - -k "not TestFixture and not TestCapture and not test_simple_terminal" +k="${k-}${k+ and }not TestFixture" +k="${k-}${k+ and }not TestCapture" +k="${k-}${k+ and }not test_simple_terminal" -%files -n python3-%{pypi_name} -f %{pyproject_files} -%doc CHANGELOG.rst README.rst +%pytest -k "${k-}" -v + + +%files -n python3-pytest-subtests -f %{pyproject_files} %license LICENSE +%doc CHANGELOG.rst +%doc README.rst + %changelog %autochangelog