Skip to content

pytest-lsp v0.3.0 - 2023-05-19

Compare
Choose a tag to compare
@github-actions github-actions released this 19 May 20:11
· 248 commits to develop since this release

v0.3.0 - 2023-05-19

Features

  • @pytest_lsp.fixture now supports the yield statement, allowing the client fixture definition to be responsible for initialising and shutting down the LSP session granting the test author full control over the contents of the initialize request.

    This is a breaking change, see the documentation for details and this PR for an example migration. (#47)

  • If a client's capabilities has been set, pytest-lsp will automatically check the server's response to see if it is compatible with the capabilities the client provided.

    If an issue is detected, pytest-lsp will emit an LspSpecificationWarning

    Note: This relies on a dedicated check_xxx function being written for each request so only a subset of the LSP spec is currently supported. (#57)

Docs

  • Add getting started guide (#47)
  • Add note on redefining the event_loop fixture to match the client fixture's scope (#49)
  • Add documentation on the built in features of the test LSP client (#50)
  • Add example on using parameterised fixtures to test with multiple clients (#51)

Misc

  • The client-server connection is now managed by a single asyncio event loop, rather than spinning up multiple threads, resulting in a much simpler architecture. (#44)

Removed

  • Helper methods like completion_request and notify_did_open have been removed. The equivalent methods provided by the LSP specification like text_document_completion_async and text_document_did_open should be used directly.

    See this PR for an example migration. (#56)