diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index d27ff8eee..a8c8ffb39 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -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: diff --git a/tests/test_instrument_tests.py b/tests/test_instrument_tests.py index a117c2205..ccec5ffe3 100644 --- a/tests/test_instrument_tests.py +++ b/tests/test_instrument_tests.py @@ -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 @@ -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: @@ -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 @@ -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: