Skip to content

Commit 2b91b6b

Browse files
committed
Make pylsp test timeout configurable
1 parent a257583 commit 2b91b6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testsuite/drivers/pylsp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ def test(
594594
shutdown: bool = True,
595595
assert_no_lsp_errors: bool = True,
596596
als_settings: ALSSettings | None = None,
597+
timeout=15,
597598
) -> Callable:
598599
"""A decorator to mark a function as a test entry point. The function must receive a
599600
single parameter of type LanguageClient.
@@ -623,6 +624,7 @@ def test(
623624
error were received after the end of the test function.
624625
:param als_settings: ALS settings to send as 'initializationOptions' with the
625626
'initialize' request. Only applicable if initialize=True (which is the default).
627+
:param timeout: test timeout in seconds
626628
"""
627629

628630
async def async_wrapper(
@@ -656,7 +658,7 @@ async def async_wrapper(
656658
LOG.info("Running test function: %s", func.__name__)
657659

658660
# Run the test with a timeout
659-
async with asyncio.timeout(15): # seconds
661+
async with asyncio.timeout(timeout):
660662
await func(client)
661663

662664
if assert_no_lsp_errors:

0 commit comments

Comments
 (0)