diff --git a/integration_tests/test_unnecessary_f_str.py b/integration_tests/test_unnecessary_f_str.py index 338733b9..7708708a 100644 --- a/integration_tests/test_unnecessary_f_str.py +++ b/integration_tests/test_unnecessary_f_str.py @@ -1,5 +1,3 @@ -import pytest - from codemodder.codemods.test import ( BaseIntegrationTest, original_and_expected_from_code_path, @@ -10,9 +8,6 @@ ) -@pytest.mark.skipif( - True, reason="May fail if it runs after test_sql_parameterization. See Issue #378." -) class TestFStr(BaseIntegrationTest): codemod = RemoveUnnecessaryFStr code_path = "tests/samples/unnecessary_f_str.py" diff --git a/src/core_codemods/__init__.py b/src/core_codemods/__init__.py index 8461c339..dafd67cc 100644 --- a/src/core_codemods/__init__.py +++ b/src/core_codemods/__init__.py @@ -37,8 +37,7 @@ from .remove_debug_breakpoint import RemoveDebugBreakpoint from .remove_future_imports import RemoveFutureImports from .remove_module_global import RemoveModuleGlobal - -# from .remove_unnecessary_f_str import RemoveUnnecessaryFStr +from .remove_unnecessary_f_str import RemoveUnnecessaryFStr from .remove_unused_imports import RemoveUnusedImports from .replace_flask_send_file import ReplaceFlaskSendFile from .requests_verify import RequestsVerify @@ -89,7 +88,7 @@ OrderImports, ProcessSandbox, RemoveFutureImports, - # RemoveUnnecessaryFStr, # Temporarely disabled due to potential error. See Issue #378. + RemoveUnnecessaryFStr, RemoveUnusedImports, RequestsVerify, SecureFlaskCookie, diff --git a/tests/codemods/test_remove_unnecessary_f_str.py b/tests/codemods/test_remove_unnecessary_f_str.py index 39505e8c..3bf6d849 100644 --- a/tests/codemods/test_remove_unnecessary_f_str.py +++ b/tests/codemods/test_remove_unnecessary_f_str.py @@ -1,5 +1,3 @@ -import pytest - from codemodder.codemods.test import BaseCodemodTest from core_codemods.remove_unnecessary_f_str import RemoveUnnecessaryFStr @@ -7,9 +5,6 @@ class TestFStr(BaseCodemodTest): codemod = RemoveUnnecessaryFStr - @pytest.mark.skip( - reason="May fail if it runs after the test_sql_parameterization. See Issue #378." - ) def test_no_change(self, tmpdir): before = r""" good: str = "good" @@ -23,9 +18,6 @@ def test_no_change(self, tmpdir): """ self.run_and_assert(tmpdir, before, before) - @pytest.mark.skip( - reason="May fail if it runs after the test_sql_parameterization. See Issue #378." - ) def test_change(self, tmpdir): before = r""" bad: str = f"bad" + "bad" @@ -39,9 +31,6 @@ def test_change(self, tmpdir): """ self.run_and_assert(tmpdir, before, after, num_changes=3) - @pytest.mark.skip( - reason="May fail if it runs after the test_sql_parameterization. See Issue #378." - ) def test_exclude_line(self, tmpdir): input_code = ( expected