mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
doc: test: mention OS detection preferences in style guideline
This commit is contained in:
parent
4c65ac96f8
commit
878d914777
1 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,10 @@ don't have test cases for.
|
|||
`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.
|
||||
- Use `f'{x}'` for string formatting in preference to `'{}'.format(x)` or `'%s' % x`.
|
||||
- Use `platform.system()` for detecting the running operating system and `os.name` to
|
||||
check whether it's a POSIX system (see also the `skip_if_platform_not_{linux,posix}`
|
||||
methods in the `BitcoinTestFramework` class, which can be used to skip a whole test
|
||||
depending on the platform).
|
||||
|
||||
#### Naming guidelines
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue