aports/community/py3-pynvim/test-attach-increase-timeout.patch
mio 54cfd98df3 community/py3-pynvim: increase timeout in test_attach test
Increase job timeout in `test/test_attach.py::test_connect_stdio` to
give some arches (ppc64le and riscv64) more time to complete the child
process. Resolves test failure on those arches.

```
______________________________ test_connect_stdio ______________________________

vim = <pynvim.api.nvim.Nvim object at 0x3f90985940>

    @xfail_on_windows
    def test_connect_stdio(vim: Nvim) -> None:
        """Tests stdio connection, using jobstart(..., {'rpc': v:true})."""

[...]

        jobid = vim.funcs.jobstart([
            'python', '-c', remote_py_code,
        ], {'rpc': True, 'on_stderr': 'OutputHandler'})
        assert jobid > 0
        exitcode = vim.funcs.jobwait([jobid], 500)[0]
        messages = vim.command_output('messages')
>       assert exitcode == 0, ("the python process failed, :messages =>\n\n" +
                               messages)
E       AssertionError: the python process failed, :messages =>
E
E
E       assert -1 == 0

test/test_attach.py:133: AssertionError
```
2025-05-23 08:28:35 +00:00

12 lines
578 B
Diff

diff -ruN a/test/test_attach.py b/test/test_attach.py
--- a/test/test_attach.py 2025-05-22 20:08:27.761122899 +0000
+++ b/test/test_attach.py 2025-05-22 20:09:14.631997436 +0000
@@ -128,7 +128,7 @@
'python', '-c', remote_py_code,
], {'rpc': True, 'on_stderr': 'OutputHandler'})
assert jobid > 0
- exitcode = vim.funcs.jobwait([jobid], 500)[0]
+ exitcode = vim.funcs.jobwait([jobid], 3000)[0]
messages = vim.command_output('messages')
assert exitcode == 0, ("the python process failed, :messages =>\n\n" +
messages)