File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff 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
97100def _windowsconsoleio_workaround (stream : TextIO ) -> None :
Original file line number Diff line number Diff line change @@ -1684,8 +1684,7 @@ def pytest_terminal_summary(config):
16841684
16851685 capture.resume_global_capture()
16861686 """ )
1687- import readline
1688-
1687+ readline = pytest .importorskip ("readline" )
16891688 backend = getattr (readline , "backend" , readline .__doc__ ) # added in Python 3.13
16901689 print (f"Readline backend: { backend } " )
16911690
You can’t perform that action at this time.
0 commit comments