(self, testcase: DataDrivenTestCase)
| 27 | base_path = test_temp_dir |
| 28 | |
| 29 | def run_case(self, testcase: DataDrivenTestCase) -> None: |
| 30 | options = infer_ir_build_options_from_test_name(testcase.name) |
| 31 | if options is None: |
| 32 | # Skipped test case |
| 33 | return |
| 34 | with use_custom_builtins(os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase): |
| 35 | try: |
| 36 | module_ir, _, _, _ = build_ir_for_single_file2(testcase.input, options) |
| 37 | except CompileError as e: |
| 38 | actual = e.messages |
| 39 | else: |
| 40 | all_deps: set[str] = set() |
| 41 | for fn in module_ir.functions: |
| 42 | compiler_options = CompilerOptions() |
| 43 | lower_ir(fn, compiler_options) |
| 44 | deps = find_implicit_op_dependencies(fn) |
| 45 | if deps: |
| 46 | for dep in deps: |
| 47 | all_deps.add(repr(dep)) |
| 48 | for cl in module_ir.classes: |
| 49 | deps = find_class_dependencies(cl) |
| 50 | if deps: |
| 51 | for dep in deps: |
| 52 | all_deps.add(repr(dep)) |
| 53 | actual = sorted(all_deps) if all_deps else ["No deps"] |
| 54 | |
| 55 | assert_test_output(testcase, actual, "Invalid test output", testcase.output) |
nothing calls this directly
no test coverage detected