./devel/py-test, Python testing tool

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 8.3.5, Package name: py312-test-8.3.5, Maintainer: pkgsrc-users

The pytest framework makes it easy to write small tests, yet scales to support
complex functional testing for applications and libraries.

Features
* Detailed info on failing assert statements (no need to remember self.assert*
names);
* Auto-discovery of test modules and functions;
* Modular fixtures for managing small or parametrized long-lived test
resources;
* Can run unittest (including trial) and nose test suites out of the box;
* Python 3.5+ and PyPy 3;
* Rich plugin architecture, with over 315+ external plugins and thriving
community;


Required to run:
[textproc/py-expat] [devel/py-setuptools] [devel/py-py] [devel/py-more-itertools] [devel/py-pluggy] [devel/py-attrs] [devel/py-wcwidth] [devel/py-packaging] [lang/python37] [devel/py-importlib-metadata]

Required to build:
[pkgtools/cwrappers] [devel/py-setuptools_scm]

Master sites:

Filesize: 1416.886 KB

Version history: (Expand)


CVS history: (Expand)


   2025-03-03 10:16:29 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.3.5

8.3.5

Bug fixes

* Fixed issue where sequences were still being shortened even with -vv verbosity.
* 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.
* 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.
* 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
* Fixed issue where pytest could crash if one of the collected directories got \ 
removed during collection.

Improved documentation

* Added dedicated page about using types with pytest.

See types{.interpreted-text role="ref"} for detailed usage.

Contributor-facing changes

* Fixed selftest failures in test_terminal.py with Pygments >= 2.19.0
* Support for Towncrier versions released in 2024 has been re-enabled
when building Sphinx docs -- by webknjaz{.interpreted-text role="user"}.
   2024-12-02 09:10:01 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.3.4

pytest 8.3.4 (2024-12-01)

Bug fixes

- Fixed :class:`KeyError` crash when using ``--import-mode=importlib`` in a \ 
directory layout where a directory contains a child directory with the same \ 
name.
- Assertion rewriting now preserves the source ranges of the original \ 
instructions, making it play well with tools that deal with the ``AST``, like \ 
`executing <https://github.com/alexmojaki/executing>`__.
- ANSI escape codes for colored output now handled correctly in \ 
:func:`pytest.fail` with `pytrace=False`.
- :func:`pytest.approx` now uses strict equality when given booleans.

Improved documentation

- Fix ambiguous docstring of :func:`pytest.Config.getoption`.
- Improve documentation on the current handling of the ``--basetemp`` option and \ 
its lack of retention functionality (:ref:`temporary directory location and \ 
retention`).
- Improved cross-references concerning the :fixture:`recwarn` fixture.
- Clarify :ref:`filterwarnings` docs on filter precedence/order when using \ 
multiple :ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings \ 
ref>` marks.

Contributor-facing changes

- Fixed two failing pdb-related tests on Python 3.13.
   2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862)
Log message:
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
   2024-10-14 11:38:57 by Thomas Klausner | Files touched by this commit (1)
Log message:
py-test: remove unused test dependency
   2024-09-10 14:36:15 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.3.3

pytest 8.3.3 (2024-09-09)

Bug fixes

- Avoid calling ``@property`` (and other instance descriptors) during fixture \ 
discovery
- Fixed the issue of not displaying assertion failure differences when using the \ 
parameter ``--import-mode=importlib`` in pytest>=8.1.
- Fixed a regression where type change in `ExceptionInfo.errisinstance` caused \ 
`mypy` to fail.
- Fixed typing compatibility with Python 3.9 or less -- replaced `typing.Self` \ 
with `typing_extensions.Self`
- Fixed an issue with backslashes being incorrectly converted in nodeid paths on \ 
Windows, ensuring consistent path handling across environments.
- Fixed bug where the verbosity levels where not being respected when printing \ 
the "msg" part of failed assertion (as in ``assert condition, msg``).
- Fix bug where disabling the terminal plugin via ``-p no:terminal`` would cause \ 
crashes related to missing the ``verbose`` option.

Improved documentation

- Clarify that the `pytest_deselected` hook should be called from \ 
`pytest_collection_modifyitems` hook implementations when items are deselected.
- Remove erroneous quotes from `tmp_path_retention_policy` example in docs.

Miscellaneous internal changes

- Fix typos discovered by codespell and add codespell to pre-commit hooks.
   2024-07-31 10:08:30 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.3.2

pytest 8.3.2 (2024-07-24)
Bug fixes
Resolve regression conda environments where no longer being automatically detected.
   2024-07-22 06:00:08 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.3.1

pytest 8.3.1 (2024-07-20)
The 8.3.0 release failed to include the change notes and docs for the release. \ 
This patch release remedies this. There are no other changes.

https://docs.pytest.org/en/stable/changelog.html
   2024-06-05 09:49:36 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 8.2.2

pytest 8.2.2 (2024-06-04)

Bug Fixes

- 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 (a fresh one \ 
is created for each test) 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.

Improved Documentation

- Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.
- Added a subsection to the documentation for debugging flaky tests to mention
  lack of thread safety in pytest as a possible source of flakyness.
- The documentation webpages now links to a canonical version to reduce outdated \ 
documentation in search engine results.