99 |
99 |
100 def format_problem_tuple(problem_tuple): |
100 def format_problem_tuple(problem_tuple): |
101 return problem_tuple[0] + ':' + str(problem_tuple[1]) |
101 return problem_tuple[0] + ':' + str(problem_tuple[1]) |
102 |
102 |
103 def run_unit_test_suite(): |
103 def run_unit_test_suite(): |
|
104 import sys |
104 from argparse import ArgumentParser |
105 from argparse import ArgumentParser |
|
106 from ldcheck import load_rcfile, LDrawContext, postprocess_library_paths |
105 parser = ArgumentParser() |
107 parser = ArgumentParser() |
106 parser.add_argument('-d', '--debug', action = 'store_true') |
108 parser.add_argument('-d', '--debug', action = 'store_true') |
107 args = parser.parse_args() |
109 parser.add_argument('-l', '--library', action = 'append') |
108 from ldcheck import LDrawContext |
110 parser.add_argument('--color', action = 'store_true') |
109 context = LDrawContext() |
111 args = parser.parse_args(load_rcfile() + sys.argv[1:]) |
|
112 context = LDrawContext(libraries = postprocess_library_paths(args.library)) |
110 test_suite = load_tests() |
113 test_suite = load_tests() |
111 num_tested = 0 |
114 num_tested = 0 |
112 num_passed = 0 |
115 num_passed = 0 |
113 all_problem_types = all_problem_type_names(test_suite) |
116 all_problem_types = all_problem_type_names(test_suite) |
114 problem_types_tested = set() |
117 problem_types_tested = set() |