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: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
Copy file name to clipboardExpand all lines: README.md
+16-19Lines changed: 16 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,50 +121,47 @@ Devo account owns. Administrator users can find them in **Administration** → *
121
121
122
122
### Pytest
123
123
124
-
The SDK uses Pytest for testing. This is a powerful tool for testing Python code. Pytest is a much more flexible and powerful tool than the built-in unittest module. It allows more testing functionality through the use of plugins. You can find more information in the [Pytest documentation](https://docs.pytest.org/en/stable/).
125
-
126
-
Install the testing requirements:
124
+
The SDK uses [Pytest](https://docs.pytest.org/en/stable/) for testing. Install the package and testing requirements, then run tests from the **project root**:
127
125
128
126
```console
127
+
pip install -e .
129
128
pip install -r requirements-test.txt
130
129
```
131
130
132
-
You can run tests from the `tests` folder of SDK
131
+
**Run all tests:**
133
132
134
133
```console
135
-
pytest
134
+
python -m pytest tests/
136
135
```
137
136
138
-
Its normal that TCP tests fails in clients or not Devo developers systems.
139
-
140
-
You can add the option `--cov` to create a coverage report.
137
+
**Run only unit tests:**
141
138
142
139
```console
143
-
pytest --cov
140
+
python -m pytest tests/unit/
144
141
```
145
142
146
-
Check the [pytest-cov documentation](https://pytest-cov.readthedocs.io/) for more details.
147
-
148
-
The tests are divided into unit and integration tests. The integration tests require either a connection to Devo or to a local server that is launched when testing, so you need to have the environment variables in your system for all the tests that require connection to Devo can work.
149
-
150
-
To run the unit tests only, you can use the `unit` folder:
143
+
**Run only integration tests:**
151
144
152
145
```console
153
-
pytest unit
146
+
python -m pytest tests/integration/
154
147
```
155
148
156
-
To run the integration tests only, you can use the `integration` folder:
You can also run the test for just one module. This is a useful feature if you are developing functionality in just one module.
155
+
**Run with coverage report:**
163
156
164
157
```console
165
-
pytest unit/test_sender_encoding.py
158
+
python -m pytest tests/ --cov
166
159
```
167
160
161
+
See the [pytest-cov documentation](https://pytest-cov.readthedocs.io/) for coverage options.
162
+
163
+
Integration tests need either a connection to Devo or a local server started by the test run; some tests also require environment variables (e.g. `DEVO_API_KEY`, `DEVO_API_SECRET`) or certificate paths. It is normal for integration tests that require Devo credentials or remote certs to be skipped or fail when those are not configured.
0 commit comments