Skip to content

Commit 85c19d2

Browse files
committed
Handle no readline on Windows
1 parent ec011d4 commit 85c19d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_pytest/capture.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def _readline_workaround() -> None:
9191
workaround consists of importing readline here, so we already worked around
9292
the issue by the time we could check if we need to.
9393
"""
94-
import readline # noqa: F401
94+
try:
95+
import readline # noqa: F401
96+
except ImportError:
97+
pass
9598

9699

97100
def _windowsconsoleio_workaround(stream: TextIO) -> None:

0 commit comments

Comments
 (0)