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

Function check_script_prefixes

test/functional/test_runner.py:771–780  ·  view source on GitHub ↗

Check that test scripts start with one of the allowed name prefixes.

()

Source from the content-addressed store, hash-verified

769
770
771def check_script_prefixes():
772 """Check that test scripts start with one of the allowed name prefixes."""
773
774 good_prefixes_re = re.compile("^(example|feature|interface|mempool|mining|p2p|rpc|wallet|tool)_")
775 bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None]
776
777 if bad_script_names:
778 print("%sERROR:%s %d tests not meeting naming conventions:" % (BOLD[1], BOLD[0], len(bad_script_names)))
779 print(" %s" % ("\n ".join(sorted(bad_script_names))))
780 raise AssertionError("Some tests are not following naming convention!")
781
782
783def check_script_list(*, src_dir, fail_on_warn):

Callers 1

mainFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected