diff --git a/airflow-core/tests/unit/jobs/test_scheduler_job.py b/airflow-core/tests/unit/jobs/test_scheduler_job.py index 9caeb067e09ad..ac492590e5b65 100644 --- a/airflow-core/tests/unit/jobs/test_scheduler_job.py +++ b/airflow-core/tests/unit/jobs/test_scheduler_job.py @@ -5721,7 +5721,7 @@ def test_find_and_purge_task_instances_without_heartbeats_nothing(self): @pytest.mark.usefixtures("testing_dag_bundle") def test_find_and_purge_task_instances_without_heartbeats(self, session, create_dagrun): - dagfile = os.path.join(EXAMPLE_STANDARD_DAGS_FOLDER, "example_branch_operator.py") + dagfile = EXAMPLE_STANDARD_DAGS_FOLDER / "example_branch_operator.py" dagbag = DagBag(dagfile) dag = dagbag.get_dag("example_branch_operator") dm = LazyDeserializedDAG(data=SerializedDAG.to_dict(dag)) @@ -5787,7 +5787,7 @@ def test_task_instance_heartbeat_timeout_message(self, session, create_dagrun): """ Check that the task instance heartbeat timeout message comes out as expected """ - dagfile = os.path.join(EXAMPLE_STANDARD_DAGS_FOLDER, "example_branch_operator.py") + dagfile = EXAMPLE_STANDARD_DAGS_FOLDER / "example_branch_operator.py" dagbag = DagBag(dagfile) dag = dagbag.get_dag("example_branch_operator") dm = LazyDeserializedDAG(data=SerializedDAG.to_dict(dag))