(func, *args, **kwargs)
| 3416 | |
| 3417 | @staticmethod |
| 3418 | def _trace(func, *args, **kwargs): |
| 3419 | actual_linenos = [] |
| 3420 | |
| 3421 | def trace(frame, event, arg): |
| 3422 | if event == "line" and frame.f_code.co_name == func.__name__: |
| 3423 | assert arg is None |
| 3424 | relative_lineno = frame.f_lineno - func.__code__.co_firstlineno |
| 3425 | actual_linenos.append(relative_lineno) |
| 3426 | return trace |
| 3427 | |
| 3428 | old_trace = sys.gettrace() |
| 3429 | sys.settrace(trace) |
| 3430 | try: |
| 3431 | func(*args, **kwargs) |
| 3432 | finally: |
| 3433 | sys.settrace(old_trace) |
| 3434 | return actual_linenos |
| 3435 | |
| 3436 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 3437 | def test_default_wildcard(self): |
no test coverage detected