Skip to content

Commit

Permalink
Merge pull request #5029 from blueyed/minor
Browse files Browse the repository at this point in the history
Minor: doc, import
  • Loading branch information
nicoddemus authored Apr 3, 2019
2 parents 15ea5ce + 7538aa7 commit 1410d3d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions doc/en/mark.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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`.
1 change: 0 additions & 1 deletion doc/en/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/_pytest/nose.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import six

import pytest
from _pytest import python
from _pytest import runner
from _pytest import unittest
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions src/_pytest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
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

Expand Down Expand Up @@ -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)
)

Expand Down

0 comments on commit 1410d3d

Please sign in to comment.