Sync from SUSE:SLFO:Main python-pytest revision 1616e15cae8c9a838efbb56c3356e4fc

This commit is contained in:
Adrian Schröter 2024-12-13 12:07:59 +01:00
parent 24cfc3f436
commit ccbe64f6c4
4 changed files with 164 additions and 21 deletions

BIN
pytest-7.4.4.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
pytest-8.3.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,151 @@
-------------------------------------------------------------------
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>
- Add patch allow-re-run-regression.patch:
* Fix regression in 8.2.2 that did not allow test case reruns.
-------------------------------------------------------------------
Thu Jun 6 11:48:38 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Update to 8.2.2
* Support for Python 3.13 (beta1 at the time of writing).
* Fix `PermissionError` crashes arising from directories which are not
selected on the command-line.
* Keyboard interrupts and system exits are now properly handled during
the test collection.
* Fixed handling of 'Function not implemented' error under squashfuse_ll,
which is a different way to say that the mountpoint is read-only.
* Fix a regression in pytest 8.2.0 where the permissions of
automatically-created .pytest_cache directories became rwx------
instead of the expected rwxr-xr-x.
* Fix possible catastrophic performance slowdown on a certain
parametrization pattern involving many higher-scoped parameters.
* Fix a regression in pytest 8.2.0 where unittest class instances were
not released promptly on test teardown but only on session teardown.
* Fix possible “Directory not empty” crashes arising from concurent cache
dir (.pytest_cache) creation. Regressed in pytest 8.2.0.
-------------------------------------------------------------------
Mon May 6 05:24:11 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 8.2.0:
* A deprecation warning is now raised when implementations of one of the
following hooks request a deprecated py.path.local parameter.
* Added support for reading command line arguments from a file using the
prefix character @.
* Fixed a regression in pytest 8.0.0 where test classes containing
setup_method and tests using @staticmethod or @classmethod would crash
with AttributeError.
* pluggy>=1.5.0 is now required.
* Added PYTEST_VERSION environment variable which is defined at the start
of the pytest session and undefined afterwards.
* Improved namespace packages detection when consider_namespace_packages
is enabled.
* pytest.importorskip will now issue a warning if the module could be
found, but raised ImportError.
* Fixed error in pytest.approx when used with numpy arrays and comparing
with other types.
* Added the new consider_namespace_packages configuration option,
defaulting to False.
* Added the new verbosity_test_cases configuration option for fine-grained
control of test execution verbosity.
* --import-mode=importlib <import-mode-importlib> now tries to import
modules using the standard import mechanism.
* Added support for sys.last_exc for post-mortem debugging on Python>=3.12.
* Fixed a regression in pytest 8.0.0 that would cause test collection to
fail due to permission errors when using --pyargs.
* Fix the stacklevel used when warning about marks used on fixtures.
* Fix an edge case where ExceptionInfo._stringify_exception could crash.
* Fix an IndexError crash raising from getstatementrange_ast.
* PytestRemovedIn8Warning deprecation warnings are now errors by default.
* Dropped support for Python 3.7.
* Files and directories are now collected in alphabetical order jointly.
* Sanitized the handling of the default parameter when defining
configuration options.
* Avoid microsecond exceeds 1_000_000 when using log-date-format with
%f specifier.
- Switch to pyproject macros.
-------------------------------------------------------------------
Mon Feb 19 09:15:31 UTC 2024 - Dan Čermák <dcermak@suse.com>

View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package python-pytest
#
# Copyright (c) 2024 SUSE LLC
#
@ -33,27 +33,29 @@
%{?sle15_python_module_pythons}
Name: python-pytest%{psuffix}
Version: 7.4.4
Version: 8.3.3
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
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 >= 0.12
Requires: python-pluggy >= 1.5
Requires: python-setuptools
Requires: (python-tomli >= 1 if python-base < 3.11)
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
@ -69,11 +71,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}
@ -91,15 +90,13 @@ 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
%python_build
%pyproject_wheel
%install
%if ! %{with test}
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pytest
%python_clone -a %{buildroot}%{_bindir}/py.test
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@ -107,11 +104,9 @@ sed -i '/pytest.mark.xfail(reason="#10042")/d' testing/test_debugging.py
%check
%if %{with test}
# Disable broken tests with latest setuptools, gh#pytest-dev/pytest#10815
donttest="test_cmdline_python_namespace_package or test_syspath_prepend_with_namespace_packages"
# Don't run pexpect tests to avoid timeout error in OBS when running
# in quemu
%pytest -n auto -m "not uses_pexpect" -k "not ($donttest)"
%pytest -n auto -m "not uses_pexpect"
%endif
%if ! %{with test}
@ -150,7 +145,7 @@ alternatives=$(update-alternatives --quiet --list py.test 2> /dev/null) && (
%{python_sitelib}/_pytest
%{python_sitelib}/py.py
%{python_sitelib}/pytest
%{python_sitelib}/pytest-%{version}*-info
%{python_sitelib}/pytest-%{version}.dist-info
%endif
%changelog