Merge pull request #5029 from blueyed/minor

Minor: doc, import
This commit is contained in:
Bruno Oliveira 2019-04-03 08:58:12 -03:00 committed by GitHub
commit 1410d3dc9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,7 @@
.. _mark:
Marking test functions with attributes
=================================================================
======================================
By using the ``pytest.mark`` helper you can easily set
metadata on your test functions. There are
@ -164,4 +162,4 @@ More details can be found in the `original PR <https://github.com/pytest-dev/pyt
.. note::
in a future major relase of pytest we will introduce class based markers,
at which point markers will no longer be limited to instances of :py:class:`Mark`
at which point markers will no longer be limited to instances of :py:class:`Mark`.

View File

@ -223,7 +223,6 @@ import ``helper.py`` normally. The contents of
pytest.register_assert_rewrite("pytest_foo.helper")
Requiring/Loading plugins in a test module or conftest file
-----------------------------------------------------------

View File

@ -1021,6 +1021,7 @@ def fixture(scope="function", params=None, autouse=False, ids=None, name=None):
:arg params: an optional list of parameters which will cause multiple
invocations of the fixture function and all of the tests
using it.
The current parameter is available in ``request.param``.
:arg autouse: if True, the fixture func is activated for all tests that
can see it. If False (the default) then an explicit

View File

@ -7,6 +7,7 @@ import sys
import six
import pytest
from _pytest import python
from _pytest import runner
from _pytest import unittest
@ -26,7 +27,7 @@ def pytest_runtest_makereport(item, call):
if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()):
# let's substitute the excinfo with a pytest.skip one
call2 = runner.CallInfo.from_call(
lambda: runner.skip(six.text_type(call.excinfo.value)), call.when
lambda: pytest.skip(six.text_type(call.excinfo.value)), call.when
)
call.excinfo = call2.excinfo

View File

@ -16,7 +16,6 @@ from .reports import CollectReport
from .reports import TestReport
from _pytest._code.code import ExceptionInfo
from _pytest.outcomes import Exit
from _pytest.outcomes import skip
from _pytest.outcomes import Skipped
from _pytest.outcomes import TEST_OUTCOME
@ -183,7 +182,7 @@ def call_and_report(item, when, log=True, **kwds):
def check_interactive_exception(call, report):
return call.excinfo and not (
hasattr(report, "wasxfail")
or call.excinfo.errisinstance(skip.Exception)
or call.excinfo.errisinstance(Skipped)
or call.excinfo.errisinstance(bdb.BdbQuit)
)