Path to this page:
Subject: CVS commit: pkgsrc/devel/py-test
From: Adam Ciarcinski
Date: 2023-04-17 10:17:42
Message id: 20230417081742.C6C87FA85@cvs.NetBSD.org
Log Message:
py-test: updated to 7.3.1
pytest 7.3.1 (2023-04-14)
=========================
Improvements
------------
- Python 3.12 support: fixed ``RuntimeError: TestResult has no addDuration \
method`` when running ``unittest`` tests.
- Python 3.12 support: fixed ``shutil.rmtree(onerror=...)`` deprecation warning \
when using :fixture:`tmp_path`.
Bug Fixes
---------
- Fixed performance regression related to :fixture:`tmp_path` and the new \
:confval:`tmp_path_retention_policy` option.
- Fix crash ``INTERNALERROR IndexError: list index out of range`` which happens \
when displaying an exception where all entries are hidden.
This reverts the change "Correctly handle ``__tracebackhide__`` for \
chained exceptions." introduced in version 7.3.0.
pytest 7.3.0 (2023-04-08)
=========================
Features
--------
- Test methods decorated with ``@classmethod`` can now be discovered as tests, \
following the same rules as normal methods. This fills the gap that static \
methods were discoverable as tests but not class methods.
- :confval:`console_output_style` now supports ``progress-even-when-capture-no`` \
to force the use of the progress output even when capture is disabled. This is \
useful in large test suites where capture may have significant performance \
impact.
- ``--log-disable`` CLI option added to disable individual loggers.
- Added :confval:`tmp_path_retention_count` and \
:confval:`tmp_path_retention_policy` configuration options to control how \
directories created by the :fixture:`tmp_path` fixture are kept.
Improvements
------------
- If multiple errors are raised in teardown, we now re-raise an \
``ExceptionGroup`` of them instead of discarding all but the last.
- Allow ``-p`` arguments to include spaces (eg: ``-p no:logging`` instead of
``-pno:logging``). Mostly useful in the ``addopts`` section of the configuration
file.
- Added ``start`` and ``stop`` timestamps to ``TestReport`` objects.
- Split the report header for ``rootdir``, ``config file`` and ``testpaths`` so \
each has its own line.
- pytest should no longer crash on AST with pathological position attributes, \
for example testing AST produced by `Hylang \
<https://github.com/hylang/hy>__`.
- The full output of a test is no longer truncated if the truncation message \
would be longer than
the hidden text. The line number shown has also been fixed.
Bug Fixes
---------
- The assertion rewriting mechanism now works correctly when assertion \
expressions contain the walrus operator.
- Fixed :fixture:`tmp_path` fixture always raising :class:`OSError` on \
``emscripten`` platform due to missing :func:`os.getuid`.
- Correctly handle ``__tracebackhide__`` for chained exceptions.
NOTE: This change was reverted in version 7.3.1.
Improved Documentation
----------------------
- Fixed the minimal example in :ref:`goodpractices`: ``pip install -e .`` \
requires a ``version`` entry in ``pyproject.toml`` to run successfully.
Trivial/Internal Changes
------------------------
- pytest no longer directly depends on the `attrs \
<https://www.attrs.org/en/stable/>`__ package. While
we at pytest all love the package dearly and would like to thank the ``attrs`` \
team for many years of cooperation and support,
it makes sense for ``pytest`` to have as little external dependencies as \
possible, as this helps downstream projects.
With that in mind, we have replaced the pytest's limited internal usage to use \
the standard library's ``dataclasses`` instead.
Nice diffs for ``attrs`` classes are still supported though.
Files: