(test_mode)
| 143 | |
| 144 | @params(*test_modes) |
| 145 | def test_trace_scope(test_mode): |
| 146 | global op_mode |
| 147 | op_mode = test_mode |
| 148 | |
| 149 | pipe = Pipeline(batch_size=2, num_threads=1, device_id=0) |
| 150 | |
| 151 | with pipe: |
| 152 | pipe.set_outputs(origin_trace()) |
| 153 | |
| 154 | dali_tbs = capture_dali_traces(lambda: pipe) |
| 155 | |
| 156 | glob = f""" File "*/test_operator_origin_trace.py", line *, in test_trace_scope |
| 157 | pipe.set_outputs(origin_trace()) |
| 158 | File "*/test_operator_origin_trace.py", line *, in origin_trace |
| 159 | return {"fn.origin_trace_dump()" if test_mode == "dali.fn" else "ops.OriginTraceDump()()"}* |
| 160 | """ |
| 161 | regex = fnmatch.translate(glob) |
| 162 | assert re.match(regex, dali_tbs[0]), f"{dali_tbs[0]} didn't match expected traceback" |
| 163 | |
| 164 | |
| 165 | @params(*test_modes) |
nothing calls this directly
no test coverage detected