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

Function check_script_list

test/functional/test_runner.py:783–797  ·  view source on GitHub ↗

Check scripts directory. Check that there are no scripts in the functional tests directory which are not being run by pull-tester.py.

(*, src_dir, fail_on_warn)

Source from the content-addressed store, hash-verified

781
782
783def check_script_list(*, src_dir, fail_on_warn):
784 """Check scripts directory.
785
786 Check that there are no scripts in the functional tests directory which are
787 not being run by pull-tester.py."""
788 script_dir = src_dir + '/test/functional/'
789 python_files = set([test_file for test_file in os.listdir(script_dir) if test_file.endswith(".py")])
790 missed_tests = list(python_files - set(map(lambda x: x.split()[0], ALL_SCRIPTS + NON_SCRIPTS)))
791 if len(missed_tests) != 0:
792 print("%sWARNING!%s The following scripts are not being run: %s. Check the test lists in test_runner.py." % (BOLD[1], BOLD[0], str(missed_tests)))
793 if fail_on_warn:
794 # On CI this warning is an error to prevent merging incomplete commits into master
795 # ELEMENTS: we disable some tests, so this should not fail
796 pass
797 #sys.exit(1)
798
799
800class RPCCoverage():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected