Skip to content

Commit 7848ee7

Browse files
committed
Edits from review
1 parent f9b8c7c commit 7848ee7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Diff for: CONTRIBUTING.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,8 @@
33
1. Clone the repo: `git clone [email protected]:python-lsp/python-lsp-server.git`
44
2. Create the virtual environment: `python3 -m venv .venv`
55
3. Activate: `source .venv/bin/activate`
6-
7-
Create a helper script to run the server without the need to `pip3 install` it
8-
on every change and name it `run` or similar:
9-
10-
```py
11-
#!/home/user/projects/python-lsp-server/.venv/bin/python
12-
import sys
13-
14-
from pylsp.__main__ import main
15-
16-
sys.exit(main())
17-
```
6+
4. Install an editable installation: `pip3 install -e .`
7+
- This will ensure you'll see your edits immediately without reinstalling the project
188

199
## Configure your editor
2010

@@ -63,5 +53,15 @@ Now the project is setup in a way you can quickly iterate change you want to add
6353

6454
# Running tests
6555

66-
1. Install dependencies: `pip3 install .[test]`
67-
2. Run `pytest`: `pytest -v`
56+
1. Install runtime dependencies: `pip3 install .[all]`
57+
2. Install test dependencies: `pip3 install .[test]`
58+
3. Run `pytest`: `pytest -v`
59+
60+
## Useful pytest options
61+
62+
- To run a specific test file, use `pytest test/test_utils.py`
63+
- To run a specific test function within a test file,
64+
use `pytest test/test_utils.py::test_debounce`
65+
- To run tests matching a certain expression, use `pytest -k format`
66+
- To increase verbosity of pytest, use `pytest -v` or `pytest -vv`
67+
- To enter a debugger on failed tests, use `pytest --pdb`

0 commit comments

Comments
 (0)