diff --git a/doc/en/builtin.rst b/doc/en/builtin.rst index b129d0a763f..31c2fa9df06 100644 --- a/doc/en/builtin.rst +++ b/doc/en/builtin.rst @@ -69,7 +69,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a .. code-block:: python - def test_output(capsys): + def test_output(capteesys): print("hello") captured = capteesys.readouterr() assert captured.out == "hello\n" diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py index 3812d88176a..6d98676be5f 100644 --- a/src/_pytest/capture.py +++ b/src/_pytest/capture.py @@ -1043,7 +1043,7 @@ def capteesys(request: SubRequest) -> Generator[CaptureFixture[str]]: .. code-block:: python - def test_output(capsys): + def test_output(capteesys): print("hello") captured = capteesys.readouterr() assert captured.out == "hello\n"