Changeset View
Changeset View
Standalone View
Standalone View
doc/functional-tests.md
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | |||||
Running `test_runner.py` with the `--coverage` argument tracks which RPCs are | Running `test_runner.py` with the `--coverage` argument tracks which RPCs are | ||||
called by the tests and prints a report of uncovered RPCs in the summary. This | called by the tests and prints a report of uncovered RPCs in the summary. This | ||||
can be used (along with the `--extended` argument) to find out which RPCs we | can be used (along with the `--extended` argument) to find out which RPCs we | ||||
don't have test cases for. | don't have test cases for. | ||||
#### Style guidelines | #### Style guidelines | ||||
- Where possible, try to adhere to | - Where possible, try to adhere to | ||||
[PEP-8 guidelines]([https://www.python.org/dev/peps/pep-0008/) | [PEP-8 guidelines](https://www.python.org/dev/peps/pep-0008/) | ||||
- Use a python linter like flake8 before submitting PRs to catch common style | - Use a python linter like flake8 before submitting PRs to catch common style | ||||
nits (eg trailing whitespace, unused imports, etc) | nits (eg trailing whitespace, unused imports, etc) | ||||
- Avoid wildcard imports where possible | - Avoid wildcard imports where possible | ||||
- Use a module-level docstring to describe what the test is testing, and how it | - Use a module-level docstring to describe what the test is testing, and how it | ||||
is testing it. | is testing it. | ||||
- When subclassing the BitcoinTestFramwork, place overrides for the | - When subclassing the BitcoinTestFramwork, place overrides for the | ||||
`set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of | `set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of | ||||
the subclass, then locally-defined helper methods, then the `run_test()` method. | the subclass, then locally-defined helper methods, then the `run_test()` method. | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |