4
4
5
5
#### Example test
6
6
7
- The [ example_test.py] ( example_test.py ) is a heavily commented example of a test case that uses both
8
- the RPC and P2P interfaces. If you are writing your first test, copy that file
9
- and modify to fit your needs.
7
+ The file [ test/functional/ example_test.py] ( example_test.py ) is a heavily commented example
8
+ of a test case that uses both the RPC and P2P interfaces. If you are writing your first test, copy
9
+ that file and modify to fit your needs.
10
10
11
11
#### Coverage
12
12
13
- Running ` test_runner.py ` with the ` --coverage ` argument tracks which RPCs are
13
+ Running ` test/functional/ test_runner.py` with the ` --coverage ` argument tracks which RPCs are
14
14
called by the tests and prints a report of uncovered RPCs in the summary. This
15
15
can be used (along with the ` --extended ` argument) to find out which RPCs we
16
16
don't have test cases for.
@@ -82,7 +82,7 @@ P2P messages. These can be found in the following source files:
82
82
83
83
#### Using the P2P interface
84
84
85
- - ` messages.py ` contains all the definitions for objects that pass
85
+ - [ messages.py] ( test_framework/messages.py ) contains all the definitions for objects that pass
86
86
over the network (` CBlock ` , ` CTransaction ` , etc, along with the network-level
87
87
wrappers for them, ` msg_block ` , ` msg_tx ` , etc).
88
88
@@ -96,32 +96,35 @@ the Bitcoin Core node application logic. For custom behaviour, subclass the
96
96
P2PInterface object and override the callback methods.
97
97
98
98
- Can be used to write tests where specific P2P protocol behavior is tested.
99
- Examples tests are ` p2p_unrequested_blocks.py ` , ` p2p_compactblocks.py ` .
99
+ Examples tests are [ p2p_unrequested_blocks.py] ( p2p_unrequested_blocks.py ) ,
100
+ [ p2p_compactblocks.py] ( p2p_compactblocks.py ) .
100
101
101
- ### test-framework modules
102
+ ### Test framework modules
103
+ The following are useful modules for test developers. They are located in
104
+ [ test/functional/test_framework/] ( test_framework ) .
102
105
103
- #### [ test_framework/ authproxy.py] ( test_framework/authproxy.py )
106
+ #### [ authproxy.py] ( test_framework/authproxy.py )
104
107
Taken from the [ python-bitcoinrpc repository] ( https://github.com/jgarzik/python-bitcoinrpc ) .
105
108
106
- #### [ test_framework/test_framework .py] ( test_framework/test_framework.py )
109
+ #### [ test_framework.py] ( test_framework/test_framework.py )
107
110
Base class for functional tests.
108
111
109
- #### [ test_framework/ util.py] ( test_framework/util.py )
112
+ #### [ util.py] ( test_framework/util.py )
110
113
Generally useful functions.
111
114
112
- #### [ test_framework/ mininode.py] ( test_framework/mininode.py )
115
+ #### [ mininode.py] ( test_framework/mininode.py )
113
116
Basic code to support P2P connectivity to a bitcoind.
114
117
115
- #### [ test_framework/ script.py] ( test_framework/script.py )
118
+ #### [ script.py] ( test_framework/script.py )
116
119
Utilities for manipulating transaction scripts (originally from python-bitcoinlib)
117
120
118
- #### [ test_framework/ key.py] ( test_framework/key.py )
121
+ #### [ key.py] ( test_framework/key.py )
119
122
Test-only secp256k1 elliptic curve implementation
120
123
121
- #### [ test_framework/ bignum.py] ( test_framework/bignum.py )
124
+ #### [ bignum.py] ( test_framework/bignum.py )
122
125
Helpers for script.py
123
126
124
- #### [ test_framework/ blocktools.py] ( test_framework/blocktools.py )
127
+ #### [ blocktools.py] ( test_framework/blocktools.py )
125
128
Helper functions for creating blocks and transactions.
126
129
127
130
### Benchmarking with perf
0 commit comments