You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/functional/README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,20 @@ don't have test cases for.
27
27
`set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of
28
28
the subclass, then locally-defined helper methods, then the `run_test()` method.
29
29
30
+
#### Naming guidelines
31
+
32
+
- Name the test `<area>_test.py`, where area can be one of the following:
33
+
-`feature` for tests for full features that aren't wallet/mining/mempool, eg `feature_rbf.py`
34
+
-`interface` for tests for other interfaces (REST, ZMQ, etc), eg `interface_rest.py`
35
+
-`mempool` for tests for mempool behaviour, eg `mempool_reorg.py`
36
+
-`mining` for tests for mining features, eg `mining_prioritisetransaction.py`
37
+
-`p2p` for tests that explicitly test the p2p interface, eg `p2p_disconnect_ban.py`
38
+
-`rpc` for tests for individual RPC methods or features, eg `rpc_listtransactions.py`
39
+
-`wallet` for tests for wallet features, eg `wallet_keypool.py`
40
+
- use an underscore to separate words
41
+
- exception: for tests for specific RPCs or command line options which don't include underscores, name the test after the exact RPC or argument name, eg `rpc_decodescript.py`, not `rpc_decode_script.py`
42
+
- Don't use the redundant work `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py`
43
+
30
44
#### General test-writing advice
31
45
32
46
- Set `self.num_nodes` to the minimum number of nodes necessary for the test.
0 commit comments