From 17e4b2a75b5e901d2d125cf9d818e63e42472705 Mon Sep 17 00:00:00 2001 From: Bruno Dufour Date: Mon, 9 Dec 2024 14:48:11 -0800 Subject: [PATCH] Fix following rebase --- .../codegen/templating/test_templates_processor.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/nativeapp/codegen/templating/test_templates_processor.py b/tests/nativeapp/codegen/templating/test_templates_processor.py index 05917c27a5..3ca1240e48 100644 --- a/tests/nativeapp/codegen/templating/test_templates_processor.py +++ b/tests/nativeapp/codegen/templating/test_templates_processor.py @@ -243,14 +243,16 @@ def test_expand_templates_in_file_unicode_decode_error(mock_cc_warning): file_contents = ["This is a test file"] with TemporaryDirectory() as tmp_dir: bundle_result = bundle_files(tmp_dir, file_name, file_contents) - templates_processor = TemplatesProcessor(bundle_ctx=bundle_result.bundle_ctx) + templates_processor = TemplatesProcessor( + processor_ctx=bundle_result.processor_ctx + ) with mock.patch( f"{TEMPLATE_PROCESSOR}.TemplatesProcessor.edit_file", side_effect=UnicodeDecodeError("utf-8", b"", 0, 1, "invalid start byte"), ): src_path = Path( - bundle_result.bundle_ctx.project_root / "src" / file_name[0] - ).relative_to(bundle_result.bundle_ctx.project_root) + bundle_result.processor_ctx.project_root / "src" / file_name[0] + ).relative_to(bundle_result.processor_ctx.project_root) templates_processor.process(bundle_result.artifact_to_process, None) mock_cc_warning.assert_called_once_with( f"Could not read file {src_path}, error: invalid start byte. Skipping this file."