Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
continue-on-error: true
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 6 additions & 14 deletions tests/test_instrument_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
codeflash_test_index = codeflash_wrap.index[test_id]
invocation_id = f'{{line_id}}_{{codeflash_test_index}}'
"""
if sys.version_info < (3, 12):
expected += """test_stdout_tag = f"{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}"
"""
else:
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
"""
expected += """print(f'!$######{{test_stdout_tag}}######$!')
exception = None
Expand Down Expand Up @@ -189,9 +185,9 @@ def test_sort(self):
)
os.chdir(original_cwd)
assert success
assert new_test == expected.format(
assert new_test.replace('"', "'") == expected.format(
module_path=Path(f.name).name, tmp_dir_path=get_run_tmp_file(Path("test_return_values"))
)
).replace('"', "'")


def test_perfinjector_only_replay_test() -> None:
Expand Down Expand Up @@ -233,11 +229,7 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
codeflash_test_index = codeflash_wrap.index[test_id]
invocation_id = f'{{line_id}}_{{codeflash_test_index}}'
"""
if sys.version_info < (3, 12):
expected += """test_stdout_tag = f"{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}"
"""
else:
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
"""
expected += """print(f'!$######{{test_stdout_tag}}######$!')
exception = None
Expand Down Expand Up @@ -289,9 +281,9 @@ def test_prepare_image_for_yolo():
)
os.chdir(original_cwd)
assert success
assert new_test == expected.format(
assert new_test.replace('"', "'") == expected.format(
module_path=Path(f.name).name, tmp_dir_path=get_run_tmp_file(Path("test_return_values"))
)
).replace('"', "'")


def test_perfinjector_bubble_sort_results() -> None:
Expand Down
Loading