Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 2cb4077

Browse files
committed
Move test tips to contributing doc
1 parent 37ec1ba commit 2cb4077

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ was broken. They are slower than the linters but will typically catch more error
163163
```sh
164164
source ./env/bin/activate
165165
trial tests
166+
# The tests can also be run with this longer command
167+
python -m twisted.trial tests
166168
```
167169

168170
If you wish to only run *some* unit tests, you may specify
@@ -179,6 +181,14 @@ If your tests fail, you may wish to look at the logs:
179181
less _trial_temp/test.log
180182
```
181183

184+
To see always see logger output from the app while the tests run,
185+
set `SYNAPSE_TEST_LOG_LEVEL` and the resulting logs will be in `_trial_temp/test.log`:
186+
187+
```sh
188+
SYNAPSE_TEST_LOG_LEVEL=DEBUG trial tests
189+
```
190+
191+
182192
## Run the integration tests.
183193

184194
The integration tests are a more comprehensive suite of tests. They

README.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,8 @@ differ)::
327327

328328
PASSED (skips=15, successes=1322)
329329

330-
To run a specific test::
331-
332-
python -m twisted.trial tests.storage.test_redaction
333-
python -m twisted.trial tests.handlers.test_presence.PresenceJoinTestCase.test_remote_gets_presence_when_local_user_joins
334-
335-
To see logger output from the app while the tests run, set ``SYNAPSE_TEST_LOG_LEVEL``
336-
and the resulting logs will be in ``_trial_temp/test.log``::
337-
338-
SYNAPSE_TEST_LOG_LEVEL=DEBUG python -m twisted.trial tests
330+
For more tips on running the unit tests, like running a specific test or
331+
show the logger output of the app, see the `CONTRIBUTING doc <CONTRIBUTING.md#run-the-unit-tests>`_.
339332

340333

341334
Running the Integration Tests
File renamed without changes.

0 commit comments

Comments
 (0)