Merge pull request #727 from bluetech/deprecate-boxed
Deprecate `--boxed`
This commit is contained in:
3
changelog/468.deprecation.rst
Normal file
3
changelog/468.deprecation.rst
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
The ``--boxed`` commmand line argument is deprecated.
|
||||||
|
Install pytest-forked and use ``--forked`` instead.
|
||||||
|
pytest-xdist 3.0.0 will remove the ``--boxed`` argument and pytest-forked dependency.
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
.. note::
|
.. warning::
|
||||||
|
|
||||||
Since 1.19.0, the actual implementation of the ``--boxed`` option has been moved to a
|
Since 1.19.0, the actual implementation of the ``--boxed`` option has been moved to a
|
||||||
separate plugin, `pytest-forked <https://github.com/pytest-dev/pytest-forked>`_
|
separate plugin, `pytest-forked <https://github.com/pytest-dev/pytest-forked>`_
|
||||||
which can be installed independently. The ``--boxed`` command-line options remains
|
which can be installed independently. The ``--boxed`` command-line option is deprecated
|
||||||
for backward compatibility reasons.
|
and will be removed in pytest-xdist 3.0.0; use ``--forked`` from pytest-forked instead.
|
||||||
|
|
||||||
|
|
||||||
If your testing involves C or C++ libraries you might have to deal
|
If your testing involves C or C++ libraries you might have to deal
|
||||||
|
|||||||
@@ -193,6 +193,12 @@ def pytest_configure(config):
|
|||||||
if tr:
|
if tr:
|
||||||
tr.showfspath = False
|
tr.showfspath = False
|
||||||
if config.getoption("boxed"):
|
if config.getoption("boxed"):
|
||||||
|
warning = DeprecationWarning(
|
||||||
|
"The --boxed commmand line argument is deprecated. "
|
||||||
|
"Install pytest-forked and use --forked instead. "
|
||||||
|
"pytest-xdist 3.0.0 will remove the --boxed argument and pytest-forked dependency."
|
||||||
|
)
|
||||||
|
config.issue_config_time_warning(warning, 2)
|
||||||
config.option.forked = True
|
config.option.forked = True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ def test_tmpdir_disabled(pytester: pytest.Pytester) -> None:
|
|||||||
result.stdout.fnmatch_lines("*1 passed*")
|
result.stdout.fnmatch_lines("*1 passed*")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("plugin", ["xdist.looponfail", "xdist.boxed"])
|
@pytest.mark.parametrize("plugin", ["xdist.looponfail"])
|
||||||
def test_sub_plugins_disabled(pytester, plugin) -> None:
|
def test_sub_plugins_disabled(pytester, plugin) -> None:
|
||||||
"""Test that xdist doesn't break if we disable any of its sub-plugins. (#32)"""
|
"""Test that xdist doesn't break if we disable any of its sub-plugins. (#32)"""
|
||||||
p1 = pytester.makepyfile(
|
p1 = pytester.makepyfile(
|
||||||
|
|||||||
Reference in New Issue
Block a user