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

Commit

Permalink
Move test tips to contributing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jun 9, 2021
1 parent 37ec1ba commit 2cb4077
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ was broken. They are slower than the linters but will typically catch more error
```sh
source ./env/bin/activate
trial tests
# The tests can also be run with this longer command
python -m twisted.trial tests
```

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

To see always see logger output from the app while the tests run,
set `SYNAPSE_TEST_LOG_LEVEL` and the resulting logs will be in `_trial_temp/test.log`:

```sh
SYNAPSE_TEST_LOG_LEVEL=DEBUG trial tests
```


## Run the integration tests.

The integration tests are a more comprehensive suite of tests. They
Expand Down
11 changes: 2 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,8 @@ differ)::

PASSED (skips=15, successes=1322)

To run a specific test::

python -m twisted.trial tests.storage.test_redaction
python -m twisted.trial tests.handlers.test_presence.PresenceJoinTestCase.test_remote_gets_presence_when_local_user_joins

To see logger output from the app while the tests run, set ``SYNAPSE_TEST_LOG_LEVEL``
and the resulting logs will be in ``_trial_temp/test.log``::

SYNAPSE_TEST_LOG_LEVEL=DEBUG python -m twisted.trial tests
For more tips on running the unit tests, like running a specific test or
show the logger output of the app, see the `CONTRIBUTING doc <CONTRIBUTING.md#run-the-unit-tests>`_.


Running the Integration Tests
Expand Down
File renamed without changes.

0 comments on commit 2cb4077

Please sign in to comment.