Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/test/functional/test_runner.py' has code style errors. | |||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 The Bitcoin Core developers | ||||
# Copyright (c) 2017 The Bitcoin developers | # Copyright (c) 2017 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Run regression test suite. | """Run regression test suite. | ||||
This module calls down into individual test cases via subprocess. It will | This module calls down into individual test cases via subprocess. It will | ||||
forward all unrecognized arguments onto the individual test scripts. | forward all unrecognized arguments onto the individual test scripts. | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | def __init__(self, test_num, test_case, tests_dir, tmpdir, flags=None): | ||||
self.tests_dir = tests_dir | self.tests_dir = tests_dir | ||||
self.tmpdir = tmpdir | self.tmpdir = tmpdir | ||||
self.test_case = test_case | self.test_case = test_case | ||||
self.test_num = test_num | self.test_num = test_num | ||||
self.flags = flags | self.flags = flags | ||||
def run(self, portseed_offset): | def run(self, portseed_offset): | ||||
t = self.test_case | t = self.test_case | ||||
portseed = self.test_num + portseed_offset | portseed = self.test_num * 10 + portseed_offset | ||||
portseed_arg = ["--portseed={}".format(portseed)] | portseed_arg = ["--portseed={}".format(portseed)] | ||||
log_stdout = tempfile.SpooledTemporaryFile(max_size=2**16) | log_stdout = tempfile.SpooledTemporaryFile(max_size=2**16) | ||||
log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16) | log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16) | ||||
test_argv = t.split() | test_argv = t.split() | ||||
tmpdir = [os.path.join("--tmpdir=%s", "%s_%s") % | tmpdir = [os.path.join("--tmpdir=%s", "%s_%s") % | ||||
(self.tmpdir, re.sub(".py$", "", t), portseed)] | (self.tmpdir, re.sub(".py$", "", t), portseed)] | ||||
name = t | name = t | ||||
time0 = time.time() | time0 = time.time() | ||||
▲ Show 20 Lines • Show All 601 Lines • Show Last 20 Lines |
'/Users/shammah/repos/bitcoin-abc/test/functional/test_runner.py' has code style errors.