13 Commits

Author SHA256 Message Date
f296985e82 Accepting request 1271899 from devel:languages:python:pytest
- Update to 8.3.5
  * Bug fixes
    - #11777: Fixed issue where sequences were still being shortened
      even with -vv verbosity.
    - #12888: Fixed broken input when using Python 3.13+ and a libedit
      build of Python, such as on macOS or with uv-managed Python
      binaries from the python-build-  standalone project.
      This could manifest e.g. by a broken prompt when using Pdb,
      or seeing empty inputs with manual usage of input() and
      suspended capturing.
    - #13026: Fixed AttributeError{.interpreted-text role="class"}
      crash when using --import-mode=importlib when top-level directory
      same name as another module of   the standard library.
    - #13053: Fixed a regression in pytest 8.3.4 where, when using
      --import-mode=importlib, a directory containing py file with
      the same name would cause an ImportError
    - #13083: Fixed issue where pytest could crash if one of the
      collected directories got removed during collection.
  * Improved documentation
    - #12842: Added dedicated page about using types with pytest.
      See types{.interpreted-text role="ref"} for detailed usage.
  * Contributor-facing changes
    - #13112: Fixed selftest failures in test_terminal.py with Pygments >= 2.19.0
    - #13256: Support for Towncrier versions released in 2024 has been re-enabled
      when building Sphinx docs -- by webknjaz{.interpreted-text role="user"}.
- Drop pygments.patch, because now in upstream.

OBS-URL: https://build.opensuse.org/request/show/1271899
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest?expand=0&rev=89
2025-04-23 13:18:19 +00:00
abf0be4b2e I give up, there's no way to verify this anyway
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=151
2025-04-22 14:07:00 +00:00
370946acf0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=150 2025-04-22 12:53:01 +00:00
b63371537e - Update to 8.3.5
* Bug fixes
    - #11777: Fixed issue where sequences were still being shortened
      even with -vv verbosity.
    - #12888: Fixed broken input when using Python 3.13+ and a libedit
      build of Python, such as on macOS or with uv-managed Python
      binaries from the python-build-  standalone project.
      This could manifest e.g. by a broken prompt when using Pdb,
      or seeing empty inputs with manual usage of input() and
      suspended capturing.
    - #13026: Fixed AttributeError{.interpreted-text role="class"}
      crash when using --import-mode=importlib when top-level directory
      same name as another module of   the standard library.
    - #13053: Fixed a regression in pytest 8.3.4 where, when using
      --import-mode=importlib, a directory containing py file with
      the same name would cause an ImportError
    - #13083: Fixed issue where pytest could crash if one of the
      collected directories got removed during collection.
  * Improved documentation
    - #12842: Added dedicated page about using types with pytest.
      See types{.interpreted-text role="ref"} for detailed usage.
  * Contributor-facing changes
    - #13112: Fixed selftest failures in test_terminal.py with Pygments >= 2.19.0
    - #13256: Support for Towncrier versions released in 2024 has been re-enabled
      when building Sphinx docs -- by webknjaz{.interpreted-text role="user"}.
- Drop pygments.patch, because now in upstream.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=149
2025-04-22 12:41:13 +00:00
3c55f3803f Accepting request 1235856 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/1235856
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest?expand=0&rev=88
2025-01-21 20:09:39 +00:00
0b41864294 - Add upstream pygments.patch to fix compatibility with new Pygments
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=147
2025-01-08 09:43:44 +00:00
626c961f3f - update to 8.3.4:
* #12592: Fixed :class:`KeyError` crash when using --import-
    mode=importlib in a directory layout where a directory
    contains a child directory with the same name.
  * #12818: Assertion rewriting now preserves the source ranges
    of the original instructions, making it play well with tools
    that deal with the AST, like executing.
  * #12849: ANSI escape codes for colored output now handled
    correctly in :func:`pytest.fail` with pytrace=False.
  * #9353: :func:`pytest.approx` now uses strict equality when
    given booleans.
  * #10558: Fix ambiguous docstring of
    :func:`pytest.Config.getoption`.
  * #10829: Improve documentation on the current handling of the
    --basetemp option and its lack of retention functionality
    (:ref:`temporary directory location and retention`).
  * #12866: Improved cross-references concerning the
    :fixture:`recwarn` fixture.
  * #12966: Clarify :ref:`filterwarnings` docs on filter
    precedence/order when using multiple
    :ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings
    ref>` marks.
  * #12497: Fixed two failing pdb-related tests on Python 3.13.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=146
2024-12-05 18:04:11 +00:00
1d1319161a Accepting request 1217929 from devel:languages:python:pytest
- update to 8.3.3:
  * #12446: Avoid calling @property (and other instance
    descriptors) during fixture discovery -- by :user:`asottile`
  * #12659: Fixed the issue of not displaying assertion failure
    differences when using the parameter --import-mode=importlib
    in pytest>=8.1.
  * #12667: Fixed a regression where type change in
    ExceptionInfo.errisinstance caused mypy to fail.
  * #12744: Fixed typing compatibility with Python 3.9 or less --
    replaced typing.Self with typing_extensions.Self -- by
    :user:`Avasam`
  * #12745: Fixed an issue with backslashes being incorrectly
    converted in nodeid paths on Windows, ensuring consistent
    path handling across environments.
  * #6682: Fixed bug where the verbosity levels where not being
    respected when printing the "msg" part of failed assertion
    (as in assert condition, msg).
  * #9422: Fix bug where disabling the terminal plugin via -p
    no:terminal would cause crashes related to missing the
    verbose option. -- by :user:`GTowers1`
  * #12663: Clarify that the pytest_deselected hook should be
    called from pytest_collection_modifyitems hook
    implementations when items are deselected.
  * #12678: Remove erroneous quotes from
    tmp_path_retention_policy example in docs.
  * #12769: Fix typos discovered by codespell and add codespell
    to pre-commit hooks.

OBS-URL: https://build.opensuse.org/request/show/1217929
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest?expand=0&rev=87
2024-10-25 17:18:44 +00:00
996feceb5e - update to 8.3.3:
* #12446: Avoid calling @property (and other instance
    descriptors) during fixture discovery -- by :user:`asottile`
  * #12659: Fixed the issue of not displaying assertion failure
    differences when using the parameter --import-mode=importlib
    in pytest>=8.1.
  * #12667: Fixed a regression where type change in
    ExceptionInfo.errisinstance caused mypy to fail.
  * #12744: Fixed typing compatibility with Python 3.9 or less --
    replaced typing.Self with typing_extensions.Self -- by
    :user:`Avasam`
  * #12745: Fixed an issue with backslashes being incorrectly
    converted in nodeid paths on Windows, ensuring consistent
    path handling across environments.
  * #6682: Fixed bug where the verbosity levels where not being
    respected when printing the "msg" part of failed assertion
    (as in assert condition, msg).
  * #9422: Fix bug where disabling the terminal plugin via -p
    no:terminal would cause crashes related to missing the
    verbose option. -- by :user:`GTowers1`
  * #12663: Clarify that the pytest_deselected hook should be
    called from pytest_collection_modifyitems hook
    implementations when items are deselected.
  * #12678: Remove erroneous quotes from
    tmp_path_retention_policy example in docs.
  * #12769: Fix typos discovered by codespell and add codespell
    to pre-commit hooks.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=144
2024-10-24 07:24:23 +00:00
2b3af71a3e Accepting request 1193499 from devel:languages:python:pytest
- update to 8.3.2:
  * Resolve regression where `conda` environments where no longer
    being automatically detected

- Update to 8.3.1:
  * New features
    + Added `--xfail-tb` flag, which turns on traceback output for XFAIL
      results.
    + Added support for keyword matching in marker expressions.
    + Added ``--no-fold-skipped`` command line option.
  * Improvements
    + The console output now uses the "third-party plugins" terminology.
    + Python virtual environment detection was improved by checking for a
      pyvenv.cfg file
    + Do not truncate arguments to functions in output when running with -vvv.
    + The readability of assertion introspection of bound methods has been
      enhanced.
    + Added timezone information to the testsuite timestamp in the JUnit XML
      report.
  * Bug Fixes
    + Fixed reporting of teardown errors in higher-scoped fixtures when
      using `--maxfail` or `--stepwise`.
    + pytest.approx now correctly handles Sequence-like objects.
    + Fixed a regression in pytest 8.0 where tracebacks get longer and
      longer when multiple tests fail due to a shared higher-scope fixture
      which raised
    + Fixed collection error upon encountering an abstract class, including
      abstract unittest.TestCase subclasses.
    + Fixed a regression in pytest 8.0.0 where package-scoped parameterized
      items were not correctly reordered to minimize setups/teardowns in

OBS-URL: https://build.opensuse.org/request/show/1193499
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest?expand=0&rev=86
2024-08-17 10:40:58 +00:00
84f1f4c802 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=142 2024-08-12 17:36:36 +00:00
80d78a5c7e - update to 8.3.2:
* Resolve regression where `conda` environments where no longer
    being automatically detected
  * Fix `PermissionError` crashes arising from directories which are not
  * Keyboard interrupts and system exits are now properly handled during
  * Fixed handling of 'Function not implemented' error under squashfuse_ll,
  * Fix a regression in pytest 8.2.0 where the permissions of
    automatically-created .pytest_cache directories became rwx------
  * Fix possible catastrophic performance slowdown on a certain
  * Fix a regression in pytest 8.2.0 where unittest class instances were
  * Fix possible “Directory not empty” crashes arising from concurent cache

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=141
2024-08-12 17:36:27 +00:00
fd7477cb5b - Update to 8.3.1:
* New features
    + Added `--xfail-tb` flag, which turns on traceback output for XFAIL
      results.
    + Added support for keyword matching in marker expressions.
    + Added ``--no-fold-skipped`` command line option.
  * Improvements
    + The console output now uses the "third-party plugins" terminology.
    + Python virtual environment detection was improved by checking for a
      pyvenv.cfg file
    + Do not truncate arguments to functions in output when running with -vvv.
    + The readability of assertion introspection of bound methods has been
      enhanced.
    + Added timezone information to the testsuite timestamp in the JUnit XML
      report.
  * Bug Fixes
    + Fixed reporting of teardown errors in higher-scoped fixtures when
      using `--maxfail` or `--stepwise`.
    + pytest.approx now correctly handles Sequence-like objects.
    + Fixed a regression in pytest 8.0 where tracebacks get longer and
      longer when multiple tests fail due to a shared higher-scope fixture
      which raised
    + Fixed collection error upon encountering an abstract class, including
      abstract unittest.TestCase subclasses.
    + Fixed a regression in pytest 8.0.0 where package-scoped parameterized
      items were not correctly reordered to minimize setups/teardowns in
      some cases.
    + Fixed crash with `assert testcase is not None` assertion failure when
      re-running unittest tests using plugins like pytest-rerunfailures.
    + Fixed a crash when returning category ``"error"`` or ``"failed"`` with

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=140
2024-07-23 04:34:32 +00:00
5 changed files with 158 additions and 131 deletions

View File

@@ -1,103 +0,0 @@
From 31791676501f8a8f9eb0d316a6d841a4c0d6738d Mon Sep 17 00:00:00 2001
From: Ran Benita <ran@unusedvar.com>
Date: Sat, 8 Jun 2024 02:11:20 +0300
Subject: [PATCH 1/2] [8.2.x] unittest: fix assertion errors on unittest reruns
---
changelog/12424.bugfix.rst | 1 +
src/_pytest/unittest.py | 2 +-
.../pytest_rerunfailures_integration.py | 11 +++++++++++
tox.ini | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 changelog/12424.bugfix.rst
create mode 100644 testing/plugins_integration/pytest_rerunfailures_integration.py
diff --git a/changelog/12424.bugfix.rst b/changelog/12424.bugfix.rst
new file mode 100644
index 00000000000..7ad1126858b
--- /dev/null
+++ b/changelog/12424.bugfix.rst
@@ -0,0 +1 @@
+Fix crash with `assert testcase is not None` assertion failure when re-running unittest tests using plugins like pytest-rerunfailures. Regressed in 8.2.2.
diff --git a/src/_pytest/unittest.py b/src/_pytest/unittest.py
index baca58bd9b2..2f3fd5b014c 100644
--- a/src/_pytest/unittest.py
+++ b/src/_pytest/unittest.py
@@ -216,7 +216,7 @@ def teardown(self) -> None:
self._explicit_tearDown()
self._explicit_tearDown = None
self._obj = None
- self._instance = None
+ del self._instance
super().teardown()
def startTest(self, testcase: "unittest.TestCase") -> None:
diff --git a/testing/plugins_integration/pytest_rerunfailures_integration.py b/testing/plugins_integration/pytest_rerunfailures_integration.py
new file mode 100644
index 00000000000..9a13a3279a9
--- /dev/null
+++ b/testing/plugins_integration/pytest_rerunfailures_integration.py
@@ -0,0 +1,11 @@
+import unittest
+
+
+class MyTestCase(unittest.TestCase):
+ first_time = True
+
+ def test_fail_the_first_time(self) -> None:
+ """Regression test for issue #12424."""
+ if self.first_time:
+ type(self).first_time = False
+ self.fail()
diff --git a/tox.ini b/tox.ini
index 30d3e68defc..e42c2265525 100644
--- a/tox.ini
+++ b/tox.ini
@@ -143,7 +143,7 @@ commands =
pytest --cov=. simple_integration.py
pytest --ds=django_settings simple_integration.py
pytest --html=simple.html simple_integration.py
- pytest --reruns 5 simple_integration.py
+ pytest --reruns 5 simple_integration.py pytest_rerunfailures_integration.py
pytest pytest_anyio_integration.py
pytest pytest_asyncio_integration.py
pytest pytest_mock_integration.py
From 63136f2c483388bf268bafbd06eb7246ed5e9097 Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <bruno@soliv.dev>
Date: Fri, 7 Jun 2024 22:17:58 -0300
Subject: [PATCH 2/2] Update testing/plugins_integration/requirements.txt from
main
This is required to make the 'plugins' tox env to pass on the 8.2.x branch.
---
testing/plugins_integration/requirements.txt | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/testing/plugins_integration/requirements.txt b/testing/plugins_integration/requirements.txt
index 9e152f1191b..f44a02915f2 100644
--- a/testing/plugins_integration/requirements.txt
+++ b/testing/plugins_integration/requirements.txt
@@ -1,9 +1,7 @@
-anyio[curio,trio]==4.3.0
-django==5.0.4
-pytest-asyncio==0.23.6
-# Temporarily not installed until pytest-bdd is fixed:
-# https://github.com/pytest-dev/pytest/pull/11785
-# pytest-bdd==7.0.1
+anyio[curio,trio]==4.4.0
+django==5.0.6
+pytest-asyncio==0.23.7
+pytest-bdd==7.1.2
pytest-cov==5.0.0
pytest-django==4.8.0
pytest-flakes==4.0.5
@@ -11,7 +9,7 @@ pytest-html==4.1.1
pytest-mock==3.14.0
pytest-rerunfailures==14.0
pytest-sugar==1.0.0
-pytest-trio==0.7.0
+pytest-trio==0.8.0
pytest-twisted==1.14.1
twisted==24.3.0
pytest-xvfb==3.0.0

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977
size 1427980

BIN
pytest-8.3.5.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,145 @@
-------------------------------------------------------------------
Tue Apr 22 12:27:46 UTC 2025 - ecsos <ecsos@opensuse.org>
- Update to 8.3.5
* Bug fixes
- #11777: Fixed issue where sequences were still being shortened
even with -vv verbosity.
- #12888: Fixed broken input when using Python 3.13+ and a libedit
build of Python, such as on macOS or with uv-managed Python
binaries from the python-build- standalone project.
This could manifest e.g. by a broken prompt when using Pdb,
or seeing empty inputs with manual usage of input() and
suspended capturing.
- #13026: Fixed AttributeError{.interpreted-text role="class"}
crash when using --import-mode=importlib when top-level directory
same name as another module of the standard library.
- #13053: Fixed a regression in pytest 8.3.4 where, when using
--import-mode=importlib, a directory containing py file with
the same name would cause an ImportError
- #13083: Fixed issue where pytest could crash if one of the
collected directories got removed during collection.
* Improved documentation
- #12842: Added dedicated page about using types with pytest.
See types{.interpreted-text role="ref"} for detailed usage.
* Contributor-facing changes
- #13112: Fixed selftest failures in test_terminal.py with Pygments >= 2.19.0
- #13256: Support for Towncrier versions released in 2024 has been re-enabled
when building Sphinx docs -- by webknjaz{.interpreted-text role="user"}.
- Drop pygments.patch, because now in upstream.
-------------------------------------------------------------------
Tue Jan 7 14:12:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add upstream pygments.patch to fix compatibility with new Pygments
-------------------------------------------------------------------
Thu Dec 5 18:03:42 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 8.3.4:
* #12592: Fixed :class:`KeyError` crash when using --import-
mode=importlib in a directory layout where a directory
contains a child directory with the same name.
* #12818: Assertion rewriting now preserves the source ranges
of the original instructions, making it play well with tools
that deal with the AST, like executing.
* #12849: ANSI escape codes for colored output now handled
correctly in :func:`pytest.fail` with pytrace=False.
* #9353: :func:`pytest.approx` now uses strict equality when
given booleans.
* #10558: Fix ambiguous docstring of
:func:`pytest.Config.getoption`.
* #10829: Improve documentation on the current handling of the
--basetemp option and its lack of retention functionality
(:ref:`temporary directory location and retention`).
* #12866: Improved cross-references concerning the
:fixture:`recwarn` fixture.
* #12966: Clarify :ref:`filterwarnings` docs on filter
precedence/order when using multiple
:ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings
ref>` marks.
* #12497: Fixed two failing pdb-related tests on Python 3.13.
-------------------------------------------------------------------
Thu Oct 24 07:24:14 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 8.3.3:
* #12446: Avoid calling @property (and other instance
descriptors) during fixture discovery -- by :user:`asottile`
* #12659: Fixed the issue of not displaying assertion failure
differences when using the parameter --import-mode=importlib
in pytest>=8.1.
* #12667: Fixed a regression where type change in
ExceptionInfo.errisinstance caused mypy to fail.
* #12744: Fixed typing compatibility with Python 3.9 or less --
replaced typing.Self with typing_extensions.Self -- by
:user:`Avasam`
* #12745: Fixed an issue with backslashes being incorrectly
converted in nodeid paths on Windows, ensuring consistent
path handling across environments.
* #6682: Fixed bug where the verbosity levels where not being
respected when printing the "msg" part of failed assertion
(as in assert condition, msg).
* #9422: Fix bug where disabling the terminal plugin via -p
no:terminal would cause crashes related to missing the
verbose option. -- by :user:`GTowers1`
* #12663: Clarify that the pytest_deselected hook should be
called from pytest_collection_modifyitems hook
implementations when items are deselected.
* #12678: Remove erroneous quotes from
tmp_path_retention_policy example in docs.
* #12769: Fix typos discovered by codespell and add codespell
to pre-commit hooks.
-------------------------------------------------------------------
Mon Aug 12 17:34:45 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 8.3.2:
* Resolve regression where `conda` environments where no longer
being automatically detected
-------------------------------------------------------------------
Tue Jul 23 04:34:06 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 8.3.1:
* New features
+ Added `--xfail-tb` flag, which turns on traceback output for XFAIL
results.
+ Added support for keyword matching in marker expressions.
+ Added ``--no-fold-skipped`` command line option.
* Improvements
+ The console output now uses the "third-party plugins" terminology.
+ Python virtual environment detection was improved by checking for a
pyvenv.cfg file
+ Do not truncate arguments to functions in output when running with -vvv.
+ The readability of assertion introspection of bound methods has been
enhanced.
+ Added timezone information to the testsuite timestamp in the JUnit XML
report.
* Bug Fixes
+ Fixed reporting of teardown errors in higher-scoped fixtures when
using `--maxfail` or `--stepwise`.
+ pytest.approx now correctly handles Sequence-like objects.
+ Fixed a regression in pytest 8.0 where tracebacks get longer and
longer when multiple tests fail due to a shared higher-scope fixture
which raised
+ Fixed collection error upon encountering an abstract class, including
abstract unittest.TestCase subclasses.
+ Fixed a regression in pytest 8.0.0 where package-scoped parameterized
items were not correctly reordered to minimize setups/teardowns in
some cases.
+ Fixed crash with `assert testcase is not None` assertion failure when
re-running unittest tests using plugins like pytest-rerunfailures.
+ Fixed a crash when returning category ``"error"`` or ``"failed"`` with
a custom test status from :hook:`pytest_report_teststatus` hook.
+ Improved handling of invalid regex patterns in
pytest.raises(match=r'...') by providing a clear error message.
+ Parametrization parameters are now compared using == instead of is
(is is still used as a fallback if the parameter does not support ==).
+ Fixed progress percentages sometimes not aligning correctly when
running with pytest-xdist -n.
- Drop patch allow-re-run-regression.patch: Included.
-------------------------------------------------------------------
Tue Jun 11 03:03:23 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -33,31 +33,24 @@
%{?sle15_python_module_pythons}
Name: python-pytest%{psuffix}
Version: 8.2.2
Version: 8.3.5
Release: 0
Summary: Simple powerful testing with Python
License: MIT
URL: https://github.com/pytest-dev/pytest
Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
# FIX-PATCH-UPSTREAM gh#pytest-dev/pytest#12438
Patch0: allow-re-run-regression.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm >= 6}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tomli >= 1 if %python-base < 3.11}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python-attrs >= 19.2.0
%if 0%{?python_version_nodots} < 311
Requires: python-exceptiongroup >= 1.0.0
Requires: python-tomli >= 1
%endif
Requires: python-iniconfig
Requires: python-packaging
Requires: python-pluggy >= 1.5
Requires: python-setuptools
Recommends: python-attrs >= 19.2.0
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
@@ -73,11 +66,8 @@ BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module attrs >= 19.2.0}
BuildRequires: %{python_module decorator}
BuildRequires: %{python_module hypothesis >= 3.56}
# nose is really not REQUIRED, the test suite skips over particular
# tests, when the package is not available.
# BuildRequires: %%{python_module nose}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pygments-pytest}
BuildRequires: %{python_module pytest >= %{version}}
BuildRequires: %{python_module pytest-xdist}
@@ -95,8 +85,6 @@ complex functional testing for applications and libraries.
%autosetup -p1 -n pytest-%{version}
# fix gh#pytest-dev/pytest#7891 still happening for Leap
sed -i '/^\[metadata\]/ a version = %{version}' setup.cfg
# Tests not failing with our current version of packages gh#pytest-dev/pytest#10042
sed -i '/pytest.mark.xfail(reason="#10042")/d' testing/test_debugging.py
%build
%pyproject_wheel