add "how to run tests"

This commit is contained in:
Joe Schr 2022-11-22 11:41:28 +01:00 committed by Matthias
parent f4025ee5de
commit a85602eb9c

View File

@ -49,6 +49,13 @@ For more information about the [Remote container extension](https://code.visuals
New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests. New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests.
If necessary, the Freqtrade team can assist and give guidance with writing good tests (however please don't expect anyone to write the tests for you). If necessary, the Freqtrade team can assist and give guidance with writing good tests (however please don't expect anyone to write the tests for you).
#### How to run tests
Use `py.test` in root folder to run all available testcases and confirm your local environment is setup correctly
!!! Note "develop branch"
This assumes that you have `stable` branch checked out. Other branches may be work in progress with tests not working yet.
#### Checking log content in tests #### Checking log content in tests
Freqtrade uses 2 main methods to check log content in tests, `log_has()` and `log_has_re()` (to check using regex, in case of dynamic log-messages). Freqtrade uses 2 main methods to check log content in tests, `log_has()` and `log_has_re()` (to check using regex, in case of dynamic log-messages).