Remove {pytester,testdir}.Session aliases
This causes `Session` documentation to be rendered again in full under `pytester` and `testdir` in the API Reference. I tried but couldn't get sphinx to hide it. Since it's a pretty odd thing to have (should just use `pytest.Session`), and I couldn't find any plugin which uses this, let's just remove it.
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Dict
|
||||
import _pytest._code
|
||||
import pytest
|
||||
from _pytest.config import ExitCode
|
||||
from _pytest.main import Session
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from _pytest.nodes import Collector
|
||||
from _pytest.pytester import Pytester
|
||||
@@ -294,7 +295,7 @@ class TestFunction:
|
||||
from _pytest.fixtures import FixtureManager
|
||||
|
||||
config = pytester.parseconfigure()
|
||||
session = pytester.Session.from_config(config)
|
||||
session = Session.from_config(config)
|
||||
session._fixturemanager = FixtureManager(session)
|
||||
|
||||
return pytest.Function.from_parent(parent=session, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user