-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,8 @@ | |
1. Clone the repo: `git clone [email protected]:python-lsp/python-lsp-server.git` | ||
2. Create the virtual environment: `python3 -m venv .venv` | ||
3. Activate: `source .venv/bin/activate` | ||
|
||
Create a helper script to run the server without the need to `pip3 install` it | ||
on every change and name it `run` or similar: | ||
|
||
```py | ||
#!/home/user/projects/python-lsp-server/.venv/bin/python | ||
import sys | ||
|
||
from pylsp.__main__ import main | ||
|
||
sys.exit(main()) | ||
``` | ||
4. Install an editable installation: `pip3 install -e .` | ||
- This will ensure you'll see your edits immediately without reinstalling the project | ||
|
||
## Configure your editor | ||
|
||
|
@@ -63,5 +53,15 @@ Now the project is setup in a way you can quickly iterate change you want to add | |
|
||
# Running tests | ||
|
||
1. Install dependencies: `pip3 install .[test]` | ||
2. Run `pytest`: `pytest -v` | ||
1. Install runtime dependencies: `pip3 install .[all]` | ||
2. Install test dependencies: `pip3 install .[test]` | ||
3. Run `pytest`: `pytest -v` | ||
|
||
## Useful pytest options | ||
|
||
- To run a specific test file, use `pytest test/test_utils.py` | ||
- To run a specific test function within a test file, | ||
use `pytest test/test_utils.py::test_debounce` | ||
- To run tests matching a certain expression, use `pytest -k format` | ||
- To increase verbosity of pytest, use `pytest -v` or `pytest -vv` | ||
- To enter a debugger on failed tests, use `pytest --pdb` |