MCPcopy Create free account
hub / github.com/ElementsProject/elements / main

Function main

test/util/test_runner.py:22–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20import sys
21
22def main():
23 config = configparser.ConfigParser()
24 config.optionxform = str
25 config.read_file(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8"))
26 env_conf = dict(config.items('environment'))
27
28 parser = argparse.ArgumentParser(description=__doc__)
29 parser.add_argument('-v', '--verbose', action='store_true')
30 args = parser.parse_args()
31 verbose = args.verbose
32
33 if verbose:
34 level = logging.DEBUG
35 else:
36 level = logging.ERROR
37 formatter = '%(asctime)s - %(levelname)s - %(message)s'
38 # Add the format/level to the logger
39 logging.basicConfig(format=formatter, level=level)
40
41 bctester(os.path.join(env_conf["SRCDIR"], "test", "util", "data"), "bitcoin-util-test.json", env_conf)
42
43def bctester(testDir, input_basename, buildenv):
44 """ Loads and parses the input file, runs all tests and reports results"""

Callers 1

test_runner.pyFile · 0.70

Calls 4

bctesterFunction · 0.85
parse_argsMethod · 0.80
joinMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected