Compare commits
7 Commits
expose-fix
...
6.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92af2e22d2 | ||
|
|
0307213254 | ||
|
|
df7b26704d | ||
|
|
1516780829 | ||
|
|
b945b39b0b | ||
|
|
2d5b8a85c2 | ||
|
|
8963644da3 |
@@ -1,2 +0,0 @@
|
||||
Fix pylint ``not-callable`` lint on ``pytest.mark.parametrize()`` and the other builtin marks:
|
||||
``skip``, ``skipif``, ``xfail``, ``usefixtures``, ``filterwarnings``.
|
||||
@@ -1 +0,0 @@
|
||||
Fix regression in plugins using ``TestReport.longreprtext`` (such as ``pytest-html``) when ``TestReport.longrepr`` is not a string.
|
||||
@@ -6,6 +6,7 @@ Release announcements
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
release-6.0.1
|
||||
release-6.0.0
|
||||
release-6.0.0rc1
|
||||
release-5.4.3
|
||||
|
||||
21
doc/en/announce/release-6.0.1.rst
Normal file
21
doc/en/announce/release-6.0.1.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
pytest-6.0.1
|
||||
=======================================
|
||||
|
||||
pytest 6.0.1 has just been released to PyPI.
|
||||
|
||||
This is a bug-fix release, being a drop-in replacement. To upgrade::
|
||||
|
||||
pip install --upgrade pytest
|
||||
|
||||
The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.
|
||||
|
||||
Thanks to all who contributed to this release, among them:
|
||||
|
||||
* Bruno Oliveira
|
||||
* Mattreex
|
||||
* Ran Benita
|
||||
* hp310780
|
||||
|
||||
|
||||
Happy testing,
|
||||
The pytest Development Team
|
||||
@@ -28,6 +28,26 @@ with advance notice in the **Deprecations** section of releases.
|
||||
|
||||
.. towncrier release notes start
|
||||
|
||||
pytest 6.0.1 (2020-07-30)
|
||||
=========================
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
- `#7394 <https://github.com/pytest-dev/pytest/issues/7394>`_: Passing an empty ``help`` value to ``Parser.add_option`` is now accepted instead of crashing when running ``pytest --help``.
|
||||
Passing ``None`` raises a more informative ``TypeError``.
|
||||
|
||||
|
||||
- `#7558 <https://github.com/pytest-dev/pytest/issues/7558>`_: Fix pylint ``not-callable`` lint on ``pytest.mark.parametrize()`` and the other builtin marks:
|
||||
``skip``, ``skipif``, ``xfail``, ``usefixtures``, ``filterwarnings``.
|
||||
|
||||
|
||||
- `#7559 <https://github.com/pytest-dev/pytest/issues/7559>`_: Fix regression in plugins using ``TestReport.longreprtext`` (such as ``pytest-html``) when ``TestReport.longrepr`` is not a string.
|
||||
|
||||
|
||||
- `#7569 <https://github.com/pytest-dev/pytest/issues/7569>`_: Fix logging capture handler's level not reset on teardown after a call to ``caplog.set_level()``.
|
||||
|
||||
|
||||
pytest 6.0.0 (2020-07-28)
|
||||
=========================
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Install ``pytest``
|
||||
.. code-block:: bash
|
||||
|
||||
$ pytest --version
|
||||
pytest 6.0.0
|
||||
pytest 6.0.1
|
||||
|
||||
.. _`simpletest`:
|
||||
|
||||
|
||||
@@ -192,8 +192,13 @@ You can override the default temporary directory setting like this:
|
||||
|
||||
pytest --basetemp=mydir
|
||||
|
||||
When distributing tests on the local machine, ``pytest`` takes care to
|
||||
configure a basetemp directory for the sub processes such that all temporary
|
||||
.. warning::
|
||||
|
||||
The contents of ``mydir`` will be completely removed, so make sure to use a directory
|
||||
for that purpose only.
|
||||
|
||||
When distributing tests on the local machine using ``pytest-xdist``, care is taken to
|
||||
automatically configure a basetemp directory for the sub processes such that all temporary
|
||||
data lands below a single per-test run basetemp directory.
|
||||
|
||||
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
|
||||
|
||||
@@ -170,6 +170,8 @@ def showhelp(config: Config) -> None:
|
||||
help, type, default = config._parser._inidict[name]
|
||||
if type is None:
|
||||
type = "string"
|
||||
if help is None:
|
||||
raise TypeError("help argument cannot be None for {}".format(name))
|
||||
spec = "{} ({}):".format(name, type)
|
||||
tw.write(" %s" % spec)
|
||||
spec_len = len(spec)
|
||||
@@ -191,9 +193,10 @@ def showhelp(config: Config) -> None:
|
||||
tw.write(" " * (indent_len - spec_len - 2))
|
||||
wrapped = textwrap.wrap(help, columns - indent_len, break_on_hyphens=False)
|
||||
|
||||
tw.line(wrapped[0])
|
||||
for line in wrapped[1:]:
|
||||
tw.line(indent + line)
|
||||
if wrapped:
|
||||
tw.line(wrapped[0])
|
||||
for line in wrapped[1:]:
|
||||
tw.line(indent + line)
|
||||
|
||||
tw.line()
|
||||
tw.line("environment variables:")
|
||||
|
||||
@@ -38,6 +38,41 @@ def test_help(testdir):
|
||||
)
|
||||
|
||||
|
||||
def test_none_help_param_raises_exception(testdir):
|
||||
"""Tests a None help param raises a TypeError.
|
||||
"""
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
def pytest_addoption(parser):
|
||||
parser.addini("test_ini", None, default=True, type="bool")
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("--help")
|
||||
result.stderr.fnmatch_lines(
|
||||
["*TypeError: help argument cannot be None for test_ini*"]
|
||||
)
|
||||
|
||||
|
||||
def test_empty_help_param(testdir):
|
||||
"""Tests an empty help param is displayed correctly.
|
||||
"""
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
def pytest_addoption(parser):
|
||||
parser.addini("test_ini", "", default=True, type="bool")
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("--help")
|
||||
assert result.ret == 0
|
||||
lines = [
|
||||
" required_plugins (args):",
|
||||
" plugins that must be present for pytest to run*",
|
||||
" test_ini (bool):*",
|
||||
"environment variables:",
|
||||
]
|
||||
result.stdout.fnmatch_lines(lines, consecutive=True)
|
||||
|
||||
|
||||
def test_hookvalidation_unknown(testdir):
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user