Path to this page:
./
devel/py-test,
Python testing tool
Branch: CURRENT,
Version: 7.4.3,
Package name: py311-test-7.4.3,
Maintainer: pkgsrc-usersThe 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: 1324.394 KB
Version history: (Expand)
- (2023-10-25) Updated to version: py311-test-7.4.3
- (2023-10-23) Updated to version: py311-test-7.4.2nb1
- (2023-09-08) Updated to version: py311-test-7.4.2
- (2023-09-05) Updated to version: py311-test-7.4.1
- (2023-06-26) Updated to version: py310-test-7.4.0
- (2023-06-12) Updated to version: py310-test-7.3.2
CVS history: (Expand)
2023-10-25 10:37:18 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.4.3
pytest 7.4.3 (2023-10-24)
Bug Fixes
- Markers are now considered in the reverse mro order to ensure base class \
markers are considered first -- this resolves a regression.
- Fixed ``:=`` in asserts impacting unrelated test cases.
- Handled an edge case where :data:`sys.stderr` might already be closed when \
:ref:`faulthandler` is tearing down.
|
2023-09-08 08:26:04 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.4.2
pytest 7.4.2 (2023-09-07)
=========================
Bug Fixes
---------
- Fix doctest collection of `functools.cached_property` objects.
- Fixed bug using ``--importmode=importlib`` which would cause package \
``__init__.py`` files to be imported more than once in some cases.
- Fixed bug where `user_properties` where not being saved in the JUnit XML file \
if a fixture failed during teardown.
- Fixed crash when parsing long command line arguments that might be interpreted \
as files.
Improved Documentation
----------------------
- Improved disclaimer on pytest plugin reference page to better indicate this is \
an automated, non-curated listing.
|
2023-09-05 20:58:32 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.4.1
pytest 7.4.1 (2023-09-02)
=========================
Bug Fixes
---------
- Fixed bug where fake intermediate modules generated by \
``--import-mode=importlib`` would not include the
child modules as attributes of the parent modules.
- Fixed error assertion handling in :func:`pytest.approx` when ``None`` is an \
expected or received value when comparing dictionaries.
- Fixed issue when using ``--import-mode=importlib`` together with \
``--doctest-modules`` that caused modules
to be imported more than once, causing problems with modules that have import \
side effects.
|
2023-06-26 18:03:50 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.4.0
pytest 7.4.0 (2023-06-23)
Features
* Added ExceptionInfo.from_exception(), a simpler way to create an ExceptionInfo \
from an exception. This can replace ExceptionInfo.from_exc_info() for most uses.
Improvements
* Update test log report annotation to named tuple and fixed inconsistency in \
docs for pytest_report_teststatus hook.
* When an exception traceback to be displayed is completely filtered out (by \
mechanisms such as __tracebackhide__, internal frames, and similar), now only \
the exception string and the following message are shown:
“All traceback entries are hidden. Pass --full-trace to see hidden and \
internal frames.”.
Previously, the last frame of the traceback was shown, even though it was hidden.
* Improved verbose output (-vv) of skip and xfail reasons by performing text \
wrapping while leaving a clear margin for progress output.
Added TerminalReporter.wrap_write() as a helper for that.
* Added handling of %f directive to print microseconds in log format options, \
such as log-date-format.
* Added the underlying exception to the cache provider’s path creation and \
write warning messages.
* Added warning when testpaths is set, but paths are not found by glob. In this \
case, pytest will fall back to searching from the current directory.
* When --confcutdir is not specified, and there is no config file present, the \
conftest cutoff directory (--confcutdir) is now set to the rootdir. Previously \
in such cases, conftest.py files would be probed all the way to the root \
directory of the filesystem. If you are badly affected by this change, consider \
adding an empty config file to your desired cutoff directory, or explicitly set \
--confcutdir.
* The norecursedirs check is now performed in a pytest_ignore_collect \
implementation, so plugins can affect it.
If after updating to this version you see that your norecursedirs setting is not \
being respected, it means that a conftest or a plugin you use has a bad \
pytest_ignore_collect implementation. Most likely, your hook returns False for \
paths it does not want to ignore, which ends the processing and doesn’t allow \
other plugins, including pytest itself, to ignore the path. The fix is to return \
None instead of False for paths your hook doesn’t want to ignore.
* caplog.set_level() and caplog.at_level() will temporarily enable the requested \
level if level was disabled globally via logging.disable(LEVEL).
Bug Fixes
* Terminal Reporting: Fixed bug when running in --tb=line mode where \
pytest.fail(pytrace=False) tests report None.
* Fixed the --last-failed whole-file skipping functionality (“skipped N \
files”) for non-python test files.
* Fixed a regression in pytest 7.3.2 which caused to testpaths to be considered \
for loading initial conftests, even when it was not utilized (e.g. when explicit \
paths were given on the command line). Now the testpaths are only considered \
when they are in use.
* Fixed traceback entries hidden with __tracebackhide__ = True still being shown \
for chained exceptions (parts after “… the above exception …” message).
* Fix writing non-encodable text to log file when using --debug.
Improved Documentation
* Improved documentation for caplog.set_level().
Trivial/Internal Changes
* Enhanced the CLI flag for -c to now include --config-file to make it clear \
that this flag applies to the usage of a custom config file.
|
2023-06-12 11:29:53 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.3.2
pytest 7.3.2 (2023-06-10)
=========================
Bug Fixes
---------
- Fix bug where very long option names could cause pytest to break with \
``OSError: [Errno 36] File name too long`` on some systems.
- Support for Python 3.12 (beta at the time of writing).
- :confval:`testpaths` is now honored to load root ``conftests``.
- The `monkeypatch` `setitem`/`delitem` type annotations now allow `TypedDict` \
arguments.
- Fixed bug in assertion rewriting where a variable assigned with the walrus \
operator could not be used later in a function call.
- Fixed ``--last-failed``'s "(skipped N files)" functionality for \
files inside of packages (directories with `__init__.py` files).
|
2023-04-17 10:17:42 by Adam Ciarcinski | Files touched by this commit (2) |  |
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.
|
2023-03-29 11:34:15 by Thomas Klausner | Files touched by this commit (96) |
Log message:
*: use PYTHON_VERSION instead of _PYTHON_VERSION
|
2023-03-07 19:58:03 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-test: updated to 7.2.2
pytest 7.2.2 (2023-03-03)
Bug Fixes
---------
- Fixed :func:`pytest.approx` handling of dictionaries containing one or more \
values of `0.0`.
- Fixed crash if `--cache-show` and `--help` are passed at the same time.
- Fixed bug where a fixture method named ``teardown`` would be called as part of \
``nose`` teardown stage.
- Fixed crash if ``--fixtures`` and ``--help`` are passed at the same time.
- Fixed :py:func:`pytest.raises` to return a 'ContextManager' so that \
type-checkers could narrow
:code:`pytest.raises(...) if ... else nullcontext()` down to 'ContextManager' \
rather than 'object'.
Improved Documentation
----------------------
- Added `CI` and `BUILD_NUMBER` environment variables to the documentation.
- Fixed entry-points declaration in the documentation example using Hatch.
- Changed wording of the module level skip to be very explicit
about not collecting tests and not executing the rest of the module.
|