File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -820,7 +820,7 @@ def main_method(self):
820820 )
821821 func_optimizer = FunctionOptimizer (function_to_optimize = func_top_optimize , test_cfg = test_config )
822822 code_context = func_optimizer .get_code_optimization_context ().unwrap ()
823- assert code_context .testgen_context_code == get_code_output
823+ assert code_context .testgen_context_code . rstrip () == get_code_output . rstrip ()
824824
825825
826826def test_code_replacement11 () -> None :
@@ -2283,16 +2283,13 @@ def test_preserves_fixture_with_complex_body(self):
22832283
22842284@pytest.fixture(autouse=True)
22852285def complex_fixture(request):
2286- if request.node.get_closest_marker("codeflash_no_autouse"):
2287- yield
2288- else:
2289- try:
2290- setup_database()
2291- configure_logging()
2292- yield get_test_client()
2293- finally:
2294- cleanup_database()
2295- reset_logging()
2286+ try:
2287+ setup_database()
2288+ configure_logging()
2289+ yield get_test_client()
2290+ finally:
2291+ cleanup_database()
2292+ reset_logging()
22962293'''
22972294 expected_code = '''
22982295import pytest
@@ -2315,7 +2312,7 @@ def complex_fixture(request):
23152312 modified_module = module .visit (modifier )
23162313
23172314 code = modified_module .code
2318- assert code .strip ()== expected_code .strip ()
2315+ assert code .rstrip ()== expected_code .rstrip ()
23192316
23202317
23212318class TestPytestMarkAdder :
You can’t perform that action at this time.
0 commit comments