Path to this page:
Subject: CVS commit: pkgsrc/devel/py-test
From: Adam Ciarcinski
Date: 2017-08-03 09:44:11
Message id: 20170803074411.B2D2FFACD@cvs.NetBSD.org
Log Message:
Pytest 3.2.0:
Deprecations and Removals
pytest.approx no longer supports >, >=, < and <= operators to avoid \
surprising/inconsistent behavior. See the docs for more information.
All old-style specific behavior in current classes in the pytestâs API is \
considered deprecated at this point and will be removed in a future release. \
This affects Python 2 users only and in rare situations.
A deprecation warning is now raised when using marks for parameters in \
pytest.mark.parametrize. Use pytest.param to apply marks to parameters instead.
Features
Add support for numpy arrays (and dicts) to approx.
Now test function objects have a pytestmark attribute containing a list of marks \
applied directly to the test function, as opposed to marks inherited from parent \
classes or modules.
Collection ignores local virtualenvs by default; âcollect-in-virtualenv \
overrides this behavior.
Allow class methods decorated as @staticmethod to be candidates for collection \
as a test function. (Only for Python 2.7 and above. Python 2.6 will still ignore \
static methods.)
Introduce mark.with_args in order to allow passing functions/classes as sole \
argument to marks.
New cache_dir ini option: sets the directory where the contents of the cache \
plugin are stored. Directory may be relative or absolute path: if relative path, \
then directory is created relative to rootdir, otherwise it is used as is. \
Additionally path may contain environment variables which are expanded during \
runtime.
Introduce the PYTEST_CURRENT_TEST environment variable that is set with the \
nodeid and stage (setup, call and teardown) of the test being currently \
executed. See the documentation for more info.
Introduced @pytest.mark.filterwarnings mark which allows overwriting the \
warnings filter on a per test, class or module level. See the docs for more \
information.
--last-failed now remembers forever when a test has failed and only forgets it \
if it passes again. This makes it easy to fix a test suite by selectively \
running files and fixing tests incrementally.
New pytest_report_collectionfinish hook which allows plugins to add messages to \
the terminal reporting after collection has been finished successfully.
Added support for PEP-415âs Exception.__suppress_context__. Now if a raise \
exception from None is caught by pytest, pytest will no longer chain the context \
in the test report. The behavior now matches Pythonâs traceback behavior.
Exceptions raised by pytest.fail, pytest.skip and pytest.xfail now subclass \
BaseException, making them harder to be caught unintentionally by normal code.
Bug Fixes
Set stdin to a closed PIPE in pytester.py.Testdir.popen() for avoid unwanted \
interactive pdb
Add missing encoding attribute to sys.std* streams when using capsys capture mode.
Fix terminal color changing to black on Windows if colorama is imported in a \
conftest.py file.
Fix line number when reporting summary of skipped tests.
capture: ensure that EncodedFile.name is a string.
The options --fixtures and --fixtures-per-test will now keep indentation within \
docstrings.
doctests line numbers are now reported correctly, fixing pytest-sugar.
Fix non-determinism in order of fixture collection. Adds new dependency \
(ordereddict) for Python 2.6.
Files: