Fix typo in PytestExperimentalApiWarning

This commit is contained in:
Bruno Oliveira 2018-09-04 11:15:39 -03:00
parent 8ce3aeadbf
commit 415a62e373
7 changed files with 10 additions and 7 deletions

View File

@ -1,2 +1,5 @@
The functions ``Node.warn`` and ``Config.warn`` have been deprecated. Instead of ``Node.warn`` users should now use
``Node.std_warn``, while ``Config.warn`` should be replaced by the standard ``warnings.warn``.
``RemovedInPytest4Warning`` and ``PytestExperimentalApiWarning`` are now part of the public API and should be accessed
using ``pytest.RemovedInPytest4Warning`` and ``pytest.PytestExperimentalApiWarning``.

View File

@ -378,5 +378,5 @@ The following warning types ares used by pytest and are part of the public API:
.. autoclass:: pytest.RemovedInPytest4Warning
.. autoclass:: pytest.PytestExerimentalApiWarning
.. autoclass:: pytest.PytestExperimentalApiWarning

View File

@ -419,7 +419,7 @@ additionally it is possible to copy examples for a example folder before running
============================= warnings summary =============================
test_example.py::test_plugin
$REGENDOC_TMPDIR/test_example.py:4: PytestExerimentalApiWarning: testdir.copy_example is an experimental api that may change over time
$REGENDOC_TMPDIR/test_example.py:4: PytestExperimentalApiWarning: testdir.copy_example is an experimental api that may change over time
testdir.copy_example("test_example.py")
-- Docs: https://docs.pytest.org/en/latest/warnings.html

View File

@ -645,7 +645,7 @@ class Testdir(object):
import warnings
warnings.warn(
pytest.PytestExerimentalApiWarning.simple("testdir.copy_example"),
pytest.PytestExperimentalApiWarning.simple("testdir.copy_example"),
stacklevel=2,
)
example_dir = self.request.config.getini("pytester_example_dir")

View File

@ -22,7 +22,7 @@ class RemovedInPytest4Warning(PytestDeprecationWarning):
"""
class PytestExerimentalApiWarning(PytestWarning, FutureWarning):
class PytestExperimentalApiWarning(PytestWarning, FutureWarning):
"""
Bases: :class:`pytest.PytestWarning`, :class:`FutureWarning`.

View File

@ -24,7 +24,7 @@ from _pytest.warning_types import (
PytestWarning,
PytestDeprecationWarning,
RemovedInPytest4Warning,
PytestExerimentalApiWarning,
PytestExperimentalApiWarning,
)
set_trace = __pytestPDB.set_trace
@ -55,7 +55,7 @@ __all__ = [
"Package",
"param",
"PytestDeprecationWarning",
"PytestExerimentalApiWarning",
"PytestExperimentalApiWarning",
"PytestWarning",
"raises",
"register_assert_rewrite",

View File

@ -230,7 +230,7 @@ filterwarnings =
# produced by python >=3.5 on execnet (pytest-xdist)
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
# pytest's own futurewarnings
ignore::pytest.PytestExerimentalApiWarning
ignore::pytest.PytestExperimentalApiWarning
pytester_example_dir = testing/example_scripts
[flake8]
max-line-length = 120