# Conflicts: # .claude/rules/architecture.md # .claude/rules/code-style.md # .github/workflows/claude.yml # .github/workflows/duplicate-code-detector.yml # codeflash/api/aiservice.py # codeflash/cli_cmds/console.py # codeflash/cli_cmds/logging_config.py # codeflash/code_utils/deduplicate_code.py # codeflash/discovery/discover_unit_tests.py # codeflash/languages/base.py # codeflash/languages/code_replacer.py # codeflash/languages/javascript/mocha_runner.py # codeflash/languages/javascript/support.py # codeflash/languages/python/support.py # codeflash/optimization/function_optimizer.py # codeflash/verification/parse_test_output.py # codeflash/verification/verification_utils.py # codeflash/verification/verifier.py # packages/codeflash/package-lock.json # packages/codeflash/package.json # tests/languages/javascript/test_support_dispatch.py # tests/test_codeflash_capture.py # tests/test_languages/test_javascript_test_runner.py # tests/test_multi_file_code_replacement.py
14 lines
310 B
Python
14 lines
310 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]
|