Skip to content

Commit

Permalink
Handle no readline on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Jan 30, 2025
1 parent ec011d4 commit 85c19d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/_pytest/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def _readline_workaround() -> None:
workaround consists of importing readline here, so we already worked around
the issue by the time we could check if we need to.
"""
import readline # noqa: F401
try:
import readline # noqa: F401
except ImportError:
pass


def _windowsconsoleio_workaround(stream: TextIO) -> None:
Expand Down

0 comments on commit 85c19d2

Please sign in to comment.