From c6bd74f345a7fe8d6e182c5bc54b392159edab1c Mon Sep 17 00:00:00 2001 From: Shreya Date: Tue, 23 Jun 2026 17:47:08 +0100 Subject: [PATCH] Fix timezone-dependent symlink test in TestFileProcessorHandler --- .../tests/unit/utils/log/test_file_processor_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow-core/tests/unit/utils/log/test_file_processor_handler.py b/airflow-core/tests/unit/utils/log/test_file_processor_handler.py index ad0982dbea433..31d6ffe41022d 100644 --- a/airflow-core/tests/unit/utils/log/test_file_processor_handler.py +++ b/airflow-core/tests/unit/utils/log/test_file_processor_handler.py @@ -77,13 +77,13 @@ def test_symlink_latest_log_directory(self): link = os.path.join(self.base_log_folder, "latest") - with time_machine.travel(date1, tick=False): + with time_machine.travel(f"{date1} 00:00:00+00:00", tick=False): handler.set_context(filename=os.path.join(self.dag_dir, "log1")) assert os.path.islink(link) assert os.path.basename(os.path.realpath(link)) == date1 assert os.path.exists(os.path.join(link, "log1")) - with time_machine.travel(date2, tick=False): + with time_machine.travel(f"{date2} 00:00:00+00:00", tick=False): handler.set_context(filename=os.path.join(self.dag_dir, "log2")) assert os.path.islink(link) assert os.path.basename(os.path.realpath(link)) == date2