You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-33
Original file line number
Diff line number
Diff line change
@@ -65,48 +65,20 @@ That's it. You should be ready to make changes, run tests, and make commits! If
65
65
66
66
## Running tests
67
67
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:
74
69
```bash
75
-
cd sentry-python
76
-
77
-
make test
70
+
pip install -r test-requirements.txt
78
71
```
79
72
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:
87
74
```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
103
75
pytest tests/
104
76
```
105
77
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:
107
79
108
80
```bash
109
-
pytest -rs tests/integrations/flask/
81
+
pytest -rs tests/integrations/flask/# Replace "flask" with the specific integration you wish to test
110
82
```
111
83
112
84
**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