codeflash/tests/test_codeflash_trace_decorator.py
2026-01-29 01:39:48 -08:00

15 lines
311 B
Python

from codeflash.benchmarking.codeflash_trace import codeflash_trace
@codeflash_trace
def example_function(arr):
arr.sort()
return arr
def test_codeflash_trace_decorator():
arr = [3, 1, 2]
result = example_function(arr)
# cleanup test trace file using Path
assert result == [1, 2, 3]