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:
@@ -950,8 +950,6 @@ class Pytester:
|
||||
f'example "{example_path}" is not found as a file or directory'
|
||||
)
|
||||
|
||||
Session = Session
|
||||
|
||||
def getnode(
|
||||
self, config: Config, arg: Union[str, "os.PathLike[str]"]
|
||||
) -> Optional[Union[Collector, Item]]:
|
||||
@@ -1529,7 +1527,6 @@ class Testdir:
|
||||
|
||||
CLOSE_STDIN: "Final" = Pytester.CLOSE_STDIN
|
||||
TimeoutExpired: "Final" = Pytester.TimeoutExpired
|
||||
Session: "Final" = Pytester.Session
|
||||
|
||||
def __init__(self, pytester: Pytester, *, _ispytest: bool = False) -> None:
|
||||
check_ispytest(_ispytest)
|
||||
|
||||
Reference in New Issue
Block a user