diff options
author | John Newbery <john@johnnewbery.com> | 2018-02-07 09:36:13 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-03-18 12:29:02 -0400 |
commit | 0ec08a672dce3f619e46d0c7455e95a13dc5c4e2 (patch) | |
tree | e14adca17c192046a2ca0ae6393254702f241124 /test/functional/test_framework/test_framework.py | |
parent | af20f9b1d485582b8c8aa8294bac4f2c540246d2 (diff) | |
download | bitcoin-0ec08a672dce3f619e46d0c7455e95a13dc5c4e2.tar.xz |
[Tests] Move assert_start_raises_init_error method to TestNode
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 8efac9c475..aeb335edb3 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -281,27 +281,6 @@ class BitcoinTestFramework(): self.stop_node(i) self.start_node(i, extra_args) - def assert_start_raises_init_error(self, i, extra_args=None, expected_msg=None, *args, **kwargs): - with tempfile.SpooledTemporaryFile(max_size=2**16) as log_stderr: - try: - self.start_node(i, extra_args, stderr=log_stderr, *args, **kwargs) - self.stop_node(i) - except Exception as e: - assert 'bitcoind exited' in str(e) # node must have shutdown - self.nodes[i].running = False - self.nodes[i].process = None - if expected_msg is not None: - log_stderr.seek(0) - stderr = log_stderr.read().decode('utf-8') - if expected_msg not in stderr: - raise AssertionError("Expected error \"" + expected_msg + "\" not found in:\n" + stderr) - else: - if expected_msg is None: - assert_msg = "bitcoind should have exited with an error" - else: - assert_msg = "bitcoind should have exited with expected error " + expected_msg - raise AssertionError(assert_msg) - def wait_for_node_exit(self, i, timeout): self.nodes[i].process.wait(timeout) |