1207c5613d
pytest 5.2.1: Bug Fixes * Fix warnings about deprecated cmp attribute in attrs>=19.2. pytest 5.2.0: Deprecations * Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them as a keyword argument instead. Features * The scope parameter of @pytest.fixture can now be a callable that receives the fixture name and the config object as keyword-only parameters. See the docs for more information. * New behavior of the --pastebin option: failures to connect to the pastebin server are reported, without failing the pytest run Bug Fixes * Fix “lexer” being used when uploading to bpaste.net from --pastebin to “text”. * Fix --setup-only and --setup-show for custom pytest items. Trivial/Internal Changes * The HelpFormatter uses py.io.get_terminal_width for better width detection. pytest 5.1.3: Bug Fixes * Fix pypy3.6 (nightly) on windows. * Handle --fulltrace correctly with pytest.raises. * Windows: Fix regression with conftest whose qualified name contains uppercase characters. pytest 5.1.2: Bug Fixes * Fixed self reference in function-scoped fixtures defined plugin classes: previously self would be a reference to a test class, not the plugin class. * Fixed long standing issue where fixture scope was not respected when indirect fixtures were used during parametrization. * Fix decoding error when printing an error response from --pastebin. * Chained exceptions in test and collection reports are now correctly serialized, allowing plugins like pytest-xdist to display them properly. * Windows: Fix error that occurs in certain circumstances when loading conftest.py from a working directory that has casing other than the one stored in the filesystem (e.g., c:\test instead of C:\test). pytest 5.1.1: Bug Fixes * Fixed TypeError when importing pytest on Python 3.5.0 and 3.5.1. pytest 5.1.0: Removals * As per our policy, the following features have been deprecated in the 4.X series and are now removed: Request.getfuncargvalue: use Request.getfixturevalue instead. pytest.raises and pytest.warns no longer support strings as the second argument. message parameter of pytest.raises. pytest.raises, pytest.warns and ParameterSet.param now use native keyword-only syntax. This might change the exception message from previous versions, but they still raise TypeError on unknown keyword arguments as before. pytest.config global variable. tmpdir_factory.ensuretemp method. pytest_logwarning hook. RemovedInPytest4Warning warning type. request is now a reserved name for fixtures. For more information consult Deprecations and Removals in the docs. * Removed unused support code for unittest2. * pytest.fail, pytest.xfail and pytest.skip no longer support bytes for the message argument. Features * New Config.invocation_args attribute containing the unchanged arguments passed to pytest.main(). * New NUMBER option for doctests to ignore irrelevant differences in floating-point numbers. Inspired by Sébastien Boisgérault’s numtest extension for doctest. Improvements * JUnit XML now includes a timestamp and hostname in the testsuite tag. * Time taken to run the test suite now includes a human-readable representation when it takes over 60 seconds, for example: Bug Fixes * Fix RuntimeError/StopIteration when trying to collect package with “__init__.py” only. * Warnings issued during pytest_configure are explicitly not treated as errors, even if configured as such, because it otherwise completely breaks pytest. * The XML file produced by --junitxml now correctly contain a <testsuites> root element. * Fix issue where tmp_path and tmpdir would not remove directories containing files marked as read-only, which could lead to pytest crashing when executed a second time with the --basetemp option. * Replace importlib_metadata backport with importlib.metadata from the standard library on Python 3.8+. * Improve type checking for some exception-raising functions (pytest.xfail, pytest.skip, etc) so they provide better error messages when users meant to use marks (for example @pytest.xfail instead of @pytest.mark.xfail). * Fixed internal error when test functions were patched with objects that cannot be compared for truth values against others, like numpy arrays. * pytest.exit is now correctly handled in unittest cases. This makes unittest cases handle quit from pytest’s pdb correctly. * Improved output when parsing an ini configuration file fails. * Fix collection of staticmethod objects defined with functools.partial. * Skip async generator test functions, and update the warning message to refer to async def functions. Improved Documentation * Add docstring for Testdir.copy_example. Trivial/Internal Changes * XML files of the xunit2 family are now validated against the schema by pytest’s own test suite to avoid future regressions. * Cache node splitting function which can improve collection performance in very large test suites. * Simplified internal SafeRepr class and removed some dead code. * When invoking pytest’s own testsuite with PYTHONDONTWRITEBYTECODE=1, the test_xfail_handling test no longer fails. * Replace manual handling of OSError.errno in the codebase by new OSError subclasses (PermissionError, FileNotFoundError, etc.). pytest 5.0.1: Bug Fixes * Improve quoting in raises match failure message. * Fixed using multiple short options together in the command-line (for example -vs) in Python 3.8+. * --step-wise now handles xfail(strict=True) markers properly. Improved Documentation * Improve “Declaring new hooks” section in chapter “Writing Plugins” pytest 5.0.0: Important This release is a Python3.5+ only release. For more details, see our Python 2.7 and 3.4 support plan. Removals * Pytest no longer accepts prefixes of command-line arguments, for example typing pytest --doctest-mod inplace of --doctest-modules. This was previously allowed where the ArgumentParser thought it was unambiguous, but this could be incorrect due to delayed parsing of options for plugins. * PytestDeprecationWarning are now errors by default. * ExceptionInfo objects (returned by pytest.raises) now have the same str representation as repr, which avoids some confusion when users use print(e) to inspect the object.
2 lines
94 B
Text
2 lines
94 B
Text
bin/py.test @PREFIX@/bin/py.test-@PYVERSSUFFIX@
|
|
bin/pytest @PREFIX@/bin/pytest-@PYVERSSUFFIX@
|