Link [ pkgsrc | NetBSD | pkgsrc git mirror | PR fulltext-search | netbsd commit viewer ]


   
        usage: [branch:branch] [user:user] [path[@revision]] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN pkgtools/pkg)




switch to index mode

recent branches: MAIN (2h)  pkgsrc-2024Q1 (10d)  pkgsrc-2023Q4 (57d)  pkgsrc-2023Q2 (89d)  pkgsrc-2023Q3 (169d) 

2024-05-28 06:36:37 UTC Now

2019-04-02 09:43:52 UTC MAIN commitmail json YAML

py-test: updated to 4.4.0

pytest 4.4.0:

Features
* async test functions are skipped and a warning is emitted when a suitable async plugin is not installed (such as pytest-asyncio or pytest-trio).
Previously async functions would not execute at all but still be marked as 窶徘assed窶�.

* Include new disable_test_id_escaping_and_forfeit_all_rights_to_community_support option to disable ascii-escaping in parametrized values. This may cause a series of problems and as the name makes clear, use at your own risk.
* The -p option can now be used to early-load plugins also by entry-point name, instead of just by module name.
This makes it possible to early load external plugins like pytest-cov in the command-line:
pytest -p pytest_cov

* The --pdbcls option handles classes via module attributes now (e.g. pdb:pdb.Pdb with pdb++), and its validation was improved.
* The testpaths configuration option is now displayed next to the rootdir and inifile lines in the pytest header if the option is in effect, i.e., directories or file names were not explicitly passed in the command line.
Also, inifile is only displayed if there窶冱 a configuration file, instead of an empty inifile: string.

* Doctests can be skipped now dynamically using pytest.skip().
* Internal refactorings have been made in order to make the implementation of the pytest-subtests plugin possible, which adds unittest sub-test support and a new subtests fixture as discussed in 1367.
For details on the internal refactorings, please see the details on the related PR.

* pytester窶冱 LineMatcher asserts that the passed lines are a sequence.
* Handle -p plug after -p no:plug.
This can be used to override a blocked plugin (e.g. in 窶彗ddopts窶�) from the command line etc.

* Output capturing is handled correctly when only capturing via fixtures (capsys, capfs) with pdb.set_trace().
* pytester sets $HOME and $USERPROFILE to the temporary directory during test runs.
This ensures to not load configuration files from the real user窶冱 home directory.

* Namespace packages are handled better with monkeypatch.syspath_prepend and testdir.syspathinsert (via pkg_resources.fixup_namespace_packages).
* The stepwise plugin reports status information now.
* If a setup.cfg file contains [tool:pytest] and also the no longer supported [pytest] section, pytest will use [tool:pytest] ignoring [pytest]. Previously it would unconditionally error out.
This makes it simpler for plugins to support old pytest versions.

Bug Fixes
* Fix bug where fixtures requested dynamically via request.getfixturevalue() might be teardown before the requesting fixture.
* pytester unsets PYTEST_ADDOPTS now to not use outer options with testdir.runpytest().
* Use the correct modified time for years after 2038 in rewritten .pyc files.
* Fix line offsets with ScopeMismatch errors.
* -p no:plugin is handled correctly for default (internal) plugins now, e.g. with -p no:capture.
Previously they were loaded (imported) always, making e.g. the capfd fixture available.

* The pdb quit command is handled properly when used after the debug command with pdb++.
* Fix the interpretation of -qq option where it was being considered as -v instead.
* outcomes.Exit is not swallowed in assertrepr_compare anymore.
* Close logging窶冱 file handler explicitly when the session finishes.
* Fix line offset with mark collection error (off by one).

Improved Documentation
* Update docs for pytest_cmdline_parse hook to note availability liminations
Trivial/Internal Changes
* pluggy>=0.9 is now required.
* funcsigs>=1.0 is now required for Python 2.7.
* Some left-over internal code related to yield tests has been removed.
* Remove internally unused anypython fixture from the pytester plugin.
* Remove deprecated Sphinx directive, add_description_unit(), pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0.
* Fix pytest tests invocation with custom PYTHONPATH.
* New pytest_report_to_serializable and pytest_report_from_serializable experimental hooks.
These hooks will be used by pytest-xdist, pytest-subtests, and the replacement for resultlog to serialize and customize reports.
They are experimental, meaning that their details might change or even be removed completely in future patch releases without warning.

Feedback is welcome from plugin authors and users alike.

* Collector.repr_failure respects the --tb option, but only defaults to short now (with auto).

(adam)