Skip to content

Commit

Permalink
Update tests/prompts/test_common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kiancross authored Jul 24, 2024
1 parent 6fd05b4 commit c856b3b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/prompts/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,12 @@ async def run(inp):
== 1000000000000000000000000000001
)

pipe_input = create_pipe_input()
if prompt_toolkit_version < (3, 0, 29):
inp = create_pipe_input()
try:
return asyncio.run(run(inp))
finally:
inp.close()
else:
with create_pipe_input() as inp:
asyncio.run(run(inp))
pipe_input = pipe_input.create()

with pipe_input as inp:
asyncio.run(run(inp))


def test_prompt_highlight_coexist():
Expand Down

0 comments on commit c856b3b

Please sign in to comment.