Merge pull request #6285 from earonesty/patch-1
Add _pytest.fixtures.FixtureLookupError to top level import
This commit is contained in:
@@ -482,6 +482,9 @@ class FixtureRequest:
|
||||
But if you can only decide whether to use another fixture at test
|
||||
setup time, you may use this function to retrieve it inside a fixture
|
||||
or test function body.
|
||||
|
||||
:raise pytest.FixtureLookupError:
|
||||
If the given fixture could not be found.
|
||||
"""
|
||||
return self._get_active_fixturedef(argname).cached_result[0]
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ from _pytest.config import UsageError
|
||||
from _pytest.debugging import pytestPDB as __pytestPDB
|
||||
from _pytest.fixtures import fillfixtures as _fillfuncargs
|
||||
from _pytest.fixtures import fixture
|
||||
from _pytest.fixtures import FixtureLookupError
|
||||
from _pytest.fixtures import yield_fixture
|
||||
from _pytest.freeze_support import freeze_includes
|
||||
from _pytest.main import Session
|
||||
@@ -62,6 +63,7 @@ __all__ = [
|
||||
"fail",
|
||||
"File",
|
||||
"fixture",
|
||||
"FixtureLookupError",
|
||||
"freeze_includes",
|
||||
"Function",
|
||||
"hookimpl",
|
||||
|
||||
Reference in New Issue
Block a user