6f881cc880 [tests] Remove EXPECTED_VIOLATION_COUNT (Anthony Towns)
3150b3fea7 [tests] Rename misc functional tests. (Anthony Towns)
81b79f2c39 [tests] Rename rpc_* functional tests. (Anthony Towns)
61b8f7f273 [tests] Rename p2p_* functional tests. (Anthony Towns)
90600bc7db [tests] Rename wallet_* functional tests. (Anthony Towns)
ca6523d0c8 [tests] Rename feature_* functional tests. (Anthony Towns)
Pull request description:
This PR changes the functional tests to have a consistent naming scheme:
tests for individual RPC methods are named rpc_...
tests for interfaces (REST, ZMQ, RPC features) are named interface_...
tests that explicitly test the p2p interface are named p2p_...
tests for wallet features are named wallet_...
tests for mining features are named mining_...
tests for mempool behaviour are named mempool_...
tests for full features that aren't wallet/mining/mempool are named feature_...
Rationale: it's sometimes difficult for new contributors to know what's already covered by existing tests and where new tests should be added. Naming in a consistent fashion makes it easier to see what's already covered at a glance.
Tree-SHA512: 4246790552d42bbd95f6d5bdf67702b81b3b2c583ce7eaf1fe6d8e254721279b47315973c6e9ae82dad6e4c747f12188160764bf2624c0f8f3b4d39330ec8b16
@ -87,7 +87,7 @@ start the networking thread. (Continue with the test logic in your existing
@@ -87,7 +87,7 @@ start the networking thread. (Continue with the test logic in your existing
thread.)
- Can be used to write tests where specific P2P protocol behavior is tested.
Examples tests are `p2p-acceptblock.py`, `p2p-compactblocks.py`.
Examples tests are `p2p_unrequested_blocks.py`, `p2p_compactblocks.py`.
#### Comptool
@ -133,7 +133,7 @@ Each `TestInstance` consists of:
@@ -133,7 +133,7 @@ Each `TestInstance` consists of:
acceptance is tested against the given outcome.
- For examples of tests written in this framework, see
`invalidblockrequest.py` and `p2p-fullblocktest.py`.
print("INFO: %d tests not meeting naming conventions (expected %d):"%(len(bad_script_names),EXPECTED_VIOLATION_COUNT))
iflen(bad_script_names)>0:
print("INFO: %d tests not meeting naming conventions:"%(len(bad_script_names)))
print("%s"%("\n".join(sorted(bad_script_names))))
assertlen(bad_script_names)<=EXPECTED_VIOLATION_COUNT+LEEWAY,"Too many tests not following naming convention! (%d found, expected: <=%d)"%(len(bad_script_names),EXPECTED_VIOLATION_COUNT)
assertlen(bad_script_names)<=LEEWAY,"Too many tests not following naming convention! (%d found, maximum: %d)"%(len(bad_script_names),LEEWAY)