aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test-shell.md
diff options
context:
space:
mode:
authorJames Chiang <james.chiangwu@gmail.com>2019-11-05 09:24:55 +0100
committerJames Chiang <james.chiangwu@gmail.com>2019-11-05 12:55:52 +0100
commit2493770e365a7e30117dc1b8d228f9cbed97f7e1 (patch)
tree24a77629340a439841bf9ac6e211744351690bac /test/functional/test-shell.md
parenta8dea4552412668c2914b6395ef543341a9898cd (diff)
downloadbitcoin-2493770e365a7e30117dc1b8d228f9cbed97f7e1.tar.xz
TestShell: Return self from setup()
This allows user to chain setup() to the initializer. test-shell.md code examples have been updated to reflect this.
Diffstat (limited to 'test/functional/test-shell.md')
-rw-r--r--test/functional/test-shell.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/test-shell.md b/test/functional/test-shell.md
index 364fa871bb..f6ea9ef682 100644
--- a/test/functional/test-shell.md
+++ b/test/functional/test-shell.md
@@ -51,8 +51,7 @@ The following sections demonstrate how to initialize, run, and shut down a
## 3. Initializing a `TestShell` object
```
->>> test = TestShell()
->>> test.setup(num_nodes=2, setup_clean_chain=True)
+>>> test = TestShell().setup(num_nodes=2, setup_clean_chain=True)
20XX-XX-XXTXX:XX:XX.XXXXXXX TestFramework (INFO): Initializing test directory /path/to/bitcoin_func_test_XXXXXXX
```
The `TestShell` forwards all functional test parameters of the parent
@@ -66,8 +65,7 @@ temporary folder. If you need more bitcoind nodes than set by default (1),
simply increase the `num_nodes` parameter during setup.
```
->>> test2 = TestShell()
->>> test2.setup()
+>>> test2 = TestShell().setup()
TestShell is already running!
```