Commit Graph

12 Commits

Author SHA1 Message Date
Elie Richa
1df6a3b652 Address lint issues in changed Python files 2024-11-29 08:29:29 +00:00
Elie Richa
f500d06827 Fix bug in Python LSP test infra
no-issue-check
2024-11-07 15:29:36 +00:00
Nicolas Setton
c5eead8aef python test driver: on Windows, spawn a separate Python
This is needed so we can properly remove the test dir
once the test is done, without risking that the Python
interpreter has a handle on files there.

Slightly improve the semantics for the wait factor.
Improve error reporting slightly.
Fix creation of URIs with respect to drive letters.

Follow-up on #1462
2024-10-18 11:40:50 +00:00
Nicolas Setton
db3496d29b python test driver: use a finally clause to simplify code 2024-10-17 10:03:22 +00:00
Nicolas Setton
64eefe66b5 python test driver: fix capturing of replay files
* Only capture replay files when there are errors
* Capture replay files in the working clone rather
  than in /tmp/, which does not work well on shared machines.
2024-10-17 10:03:22 +00:00
Nicolas Setton
2311915325 Add a separate test driver for python
Add support for valgrind.
Add support for --debug.

Fixup LSP.__init__ to launch tasks only once all attributes
have been declared.
2024-10-17 10:03:22 +00:00
Nicolas Setton
13c356bf8f Add a rlimit mechanism 2024-10-17 10:03:22 +00:00
Nicolas Setton
401e3e56fe Minor cleanup
* Introduce our own assertion exception, to avoid printing
long tracebacks in the general case.
* Remove unused bits.
2024-10-17 10:03:22 +00:00
Nicolas Setton
d89ecd6b8a python test driver: add support for @complex_test
This decorator indicates a sophisticated test in which the
test driver must call the boilerplate initialisation and
shutdown methods. Adapt ada_lsp/called_by to demonstrate this.
2024-10-17 10:03:22 +00:00
Nicolas Setton
ce31f6fd89 python test driver: add helpers
* Helpers to create prepareCallHierarchy and incomingCalls requests
* One helper to compare the results to a locations list

Simplify the tests by leveraging these helpers.
2024-10-17 10:03:22 +00:00
Nicolas Setton
b9c7182f08 python test driver: do not spawn a separate Python
... But load directly test.py as a module, and execute the
functions marked with a given decorator.

This means we cannot change the directory for each test
(because of the possibility of running tests in parallel), so
pass the working directory to each test.

Remove initialization/initialize/didChangeConfiguration/shutdown
boilerplate from simple tests.

As a proof of concept and to test parallelism, convert another
test to the Python driver.
2024-10-17 10:03:22 +00:00
Nicolas Setton
240aa6fbd7 Add a test driver allowing to write tests in python
As an example, convert the test ada_lsp/called_by.
2024-10-17 10:03:22 +00:00