Skip to content

Commit 054c78b

Browse files
Improve README tests section
1 parent dc6e80b commit 054c78b

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
### Added
1010
### Changed
11+
* Improve README.
1112
### Deprecated
1213
### Removed
1314
### Fixed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,18 @@ python3 -m deepl --auth-key=YOUR_AUTH_KEY text --to=DE "Text to be translated."
160160
Wrap text arguments in quotes to prevent the shell from splitting sentences into words.
161161

162162
## Development
163-
The test suite depends on [deepl-mock](https://www.github.com/DeepLcom/deepl-mock). Run it in another terminal while executing the tests, using port 3000. Set the mock-server listening port using the environment variable `DEEPL_MOCK_SERVER_PORT`.
164163

165-
Execute the tests using `tox`.
164+
### Tests
165+
166+
Execute the tests using `pytest`. The tests communicate with the DeepL API using the auth key defined by the
167+
`DEEPL_AUTH_KEY` environment variable.
168+
169+
The test suite may instead be configured to communicate with the mock-server provided by
170+
[deepl-mock](https://www.github.com/DeepLcom/deepl-mock). Although most test cases work for either, some test cases work
171+
only with the DeepL API or the mock-server and will be otherwise skipped. The test cases that require the mock-server
172+
trigger server errors and test the client error-handling. To execute the tests using deepl-mock, run it in another
173+
terminal while executing the tests. Execute the tests using `pytest` with the `DEEPL_MOCK_SERVER_PORT` and
174+
`DEEPL_SERVER_URL` environment variables defined referring to the mock-server.
166175

167176
### Issues
168177
If you experience problems using the library, or would like to request a new feature, please create an

0 commit comments

Comments
 (0)