Skip to content

Commit b719952

Browse files
Clarified the procedure for running tests (#2276)
Co-authored-by: Ivana Kellyerova <[email protected]>
1 parent 4229d44 commit b719952

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

CONTRIBUTING.md

+5-33
Original file line numberDiff line numberDiff line change
@@ -65,48 +65,20 @@ That's it. You should be ready to make changes, run tests, and make commits! If
6565

6666
## Running tests
6767

68-
We have a `Makefile` to help people get started with hacking on the SDK
69-
without having to know or understand the Python ecosystem.
70-
Run `make` or `make help` to list commands.
71-
72-
So the simplest way to run tests is:
73-
68+
To run the tests, first setup your development environment according to the instructions above. Then, install the required packages for running tests with the following command:
7469
```bash
75-
cd sentry-python
76-
77-
make test
70+
pip install -r test-requirements.txt
7871
```
7972

80-
This will use [Tox](https://tox.wiki/en/latest/) to run our whole test suite
81-
under Python 2.7 and Python 3.7.
82-
83-
Of course you can always run the underlying commands yourself, which is
84-
particularly useful when wanting to provide arguments to `pytest` to run
85-
specific tests:
86-
73+
Once the requirements are installed, you can run all tests with the following command:
8774
```bash
88-
cd sentry-python
89-
90-
# create virtual environment
91-
python -m venv .venv
92-
93-
# activate virtual environment
94-
source .venv/bin/activate
95-
96-
# install sentry-python
97-
pip install -e .
98-
99-
# install requirements
100-
pip install -r test-requirements.txt
101-
102-
# run tests
10375
pytest tests/
10476
```
10577

106-
If you want to run the tests for a specific integration you should do so by doing this:
78+
If you would like to run the tests for a specific integration, use a command similar to the one below:
10779

10880
```bash
109-
pytest -rs tests/integrations/flask/
81+
pytest -rs tests/integrations/flask/ # Replace "flask" with the specific integration you wish to test
11082
```
11183

11284
**Hint:** Tests of integrations need additional dependencies. The switch `-rs` will show you why tests where skipped and what dependencies you need to install for the tests to run. (You can also consult the [tox.ini](tox.ini) file to see what dependencies are installed for each integration)

0 commit comments

Comments
 (0)