diff options
author | John Newbery <john@johnnewbery.com> | 2017-01-17 18:34:40 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-02-23 10:31:04 -0500 |
commit | 3f95a806b1cd2f3c944bda7bcc266498a59326e4 (patch) | |
tree | a1370c242d232e14a1c31a8bf203f7236342b953 /qa/rpc-tests/test_framework/comptool.py | |
parent | 61a640ea9741e5e76b945699a8332b0a9923339b (diff) | |
download | bitcoin-3f95a806b1cd2f3c944bda7bcc266498a59326e4.tar.xz |
Fix docstrings in qa tests
This commit fixes the module-level docstrings for the tests and helper
modules in qa. Many of these tests were uncommented previously - this
commit ensures that every test case has at least a minimum level of
commenting.
Diffstat (limited to 'qa/rpc-tests/test_framework/comptool.py')
-rwxr-xr-x | qa/rpc-tests/test_framework/comptool.py | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/qa/rpc-tests/test_framework/comptool.py b/qa/rpc-tests/test_framework/comptool.py index 17679fc7e1..b617895cac 100755 --- a/qa/rpc-tests/test_framework/comptool.py +++ b/qa/rpc-tests/test_framework/comptool.py @@ -2,34 +2,29 @@ # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. - -from .mininode import * -from .blockstore import BlockStore, TxStore -from .util import p2p_port - -''' -This is a tool for comparing two or more bitcoinds to each other -using a script provided. +"""Compare two or more bitcoinds to each other. To use, create a class that implements get_tests(), and pass it in as the test generator to TestManager. get_tests() should be a python generator that returns TestInstance objects. See below for definition. -''' -# TestNode behaves as follows: -# Configure with a BlockStore and TxStore -# on_inv: log the message but don't request -# on_headers: log the chain tip -# on_pong: update ping response map (for synchronization) -# on_getheaders: provide headers via BlockStore -# on_getdata: provide blocks via BlockStore +TestNode behaves as follows: + Configure with a BlockStore and TxStore + on_inv: log the message but don't request + on_headers: log the chain tip + on_pong: update ping response map (for synchronization) + on_getheaders: provide headers via BlockStore + on_getdata: provide blocks via BlockStore +""" + +from .mininode import * +from .blockstore import BlockStore, TxStore +from .util import p2p_port global mininode_lock class RejectResult(object): - ''' - Outcome that expects rejection of a transaction or block. - ''' + """Outcome that expects rejection of a transaction or block.""" def __init__(self, code, reason=b''): self.code = code self.reason = reason |