File: testing.rst

package info (click to toggle)
pygls 1.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,588 kB
  • sloc: python: 9,820; javascript: 28; makefile: 11
file content (24 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.. _testing:

Testing
=======

Unit Tests
----------

Writing unit tests for registered features and commands are easy and you don't
have to mock the whole language server. If you skipped the advanced usage page,
take a look at :ref:`passing language server instance <passing-instance>`
section for more details.

Integration Tests
-----------------

Integration tests coverage includes the whole workflow, from sending the client
request, to getting the result from the server. Since the *Language Server
Protocol* defines bidirectional communication between the client and the
server, we used *pygls* to simulate the client and send desired requests to the
server. To get a better understanding of how to set it up, take a look at our test
`fixtures`_.

.. _fixtures: https://github.com/openlawlibrary/pygls/blob/main/tests/conftest.py