mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #14526: docs: Document lint tests
8640631ebc docs: Document lint tests (Mason Simon) Pull request description: Replaces #13708. Fixed the macOS nit, and added `codespell` as a requirement. Tree-SHA512: efdef8238f9d4433cc6403f58075b906d39d6a2114821cb113a16f2fc45d0c10c603588272865edd40a0498d9685ff8ac25d2491d9fcf0f1f328b6d65751ac2c
This commit is contained in:
parent
bf84aca4db
commit
dc425c3fea
@ -3,17 +3,18 @@ utilities in their entirety. It does not contain unit tests, which
|
|||||||
can be found in [/src/test](/src/test), [/src/wallet/test](/src/wallet/test),
|
can be found in [/src/test](/src/test), [/src/wallet/test](/src/wallet/test),
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
There are currently two sets of tests in this directory:
|
This directory contains the following sets of tests:
|
||||||
|
|
||||||
- [functional](/test/functional) which test the functionality of
|
- [functional](/test/functional) which test the functionality of
|
||||||
dashd and dash-qt by interacting with them through the RPC and P2P
|
dashd and dash-qt by interacting with them through the RPC and P2P
|
||||||
interfaces.
|
interfaces.
|
||||||
- [util](/test/util) which tests the dash utilities, currently only
|
- [util](/test/util) which tests the dash utilities, currently only
|
||||||
dash-tx.
|
dash-tx.
|
||||||
|
- [lint](/test/lint/) which perform various static analysis checks.
|
||||||
|
|
||||||
The util tests are run as part of `make check` target. The functional
|
The util tests are run as part of `make check` target. The functional
|
||||||
tests are run by the travis continuous build process whenever a pull
|
tests and lint scripts are run by the travis continuous build process whenever a pull
|
||||||
request is opened. Both sets of tests can also be run locally.
|
request is opened. All sets of tests can also be run locally.
|
||||||
|
|
||||||
# Running tests locally
|
# Running tests locally
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ The ZMQ functional test requires a python ZMQ library. To install it:
|
|||||||
|
|
||||||
#### Running the tests
|
#### Running the tests
|
||||||
|
|
||||||
Individual tests can be run by directly calling the test script, eg:
|
Individual tests can be run by directly calling the test script, e.g.:
|
||||||
|
|
||||||
```
|
```
|
||||||
test/functional/wallet_hd.py
|
test/functional/wallet_hd.py
|
||||||
@ -210,6 +211,26 @@ See this link for considerations: https://www.kernel.org/doc/Documentation/secur
|
|||||||
Util tests can be run locally by running `test/util/bitcoin-util-test.py`.
|
Util tests can be run locally by running `test/util/bitcoin-util-test.py`.
|
||||||
Use the `-v` option for verbose output.
|
Use the `-v` option for verbose output.
|
||||||
|
|
||||||
|
### Lint tests
|
||||||
|
|
||||||
|
#### Dependencies
|
||||||
|
|
||||||
|
The lint tests require codespell and flake8. To install: `pip3 install codespell flake8`.
|
||||||
|
|
||||||
|
#### Running the tests
|
||||||
|
|
||||||
|
Individual tests can be run by directly calling the test script, e.g.:
|
||||||
|
|
||||||
|
```
|
||||||
|
test/lint/lint-filenames.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run all the shell-based lint tests by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
test/lint/lint-all.sh
|
||||||
|
```
|
||||||
|
|
||||||
# Writing functional tests
|
# Writing functional tests
|
||||||
|
|
||||||
You are encouraged to write functional tests for new or existing features.
|
You are encouraged to write functional tests for new or existing features.
|
||||||
|
Loading…
Reference in New Issue
Block a user