|
69 | 69 | from airflow.serialization.serialized_objects import SerializedDAG
|
70 | 70 | from airflow.timetables.base import DataInterval
|
71 | 71 | from airflow.utils import timezone
|
72 |
| -from airflow.utils.file import list_py_file_paths |
73 | 72 | from airflow.utils.session import create_session, provide_session
|
74 | 73 | from airflow.utils.state import DagRunState, State, TaskInstanceState
|
75 | 74 | from airflow.utils.types import DagRunType
|
@@ -3531,36 +3530,6 @@ def test_dag_get_active_runs(self, dag_maker):
|
3531 | 3530 |
|
3532 | 3531 | assert logical_date == running_date, "Running Date must match Execution Date"
|
3533 | 3532 |
|
3534 |
| - def test_list_py_file_paths(self): |
3535 |
| - """ |
3536 |
| - [JIRA-1357] Test the 'list_py_file_paths' function used by the |
3537 |
| - scheduler to list and load DAGs. |
3538 |
| - """ |
3539 |
| - detected_files = set() |
3540 |
| - expected_files = set() |
3541 |
| - # No_dags is empty, _invalid_ is ignored by .airflowignore |
3542 |
| - ignored_files = { |
3543 |
| - "no_dags.py", |
3544 |
| - "test_invalid_cron.py", |
3545 |
| - "test_invalid_dup_task.py", |
3546 |
| - "test_ignore_this.py", |
3547 |
| - "test_invalid_param.py", |
3548 |
| - "test_invalid_param2.py", |
3549 |
| - "test_invalid_param3.py", |
3550 |
| - "test_invalid_param4.py", |
3551 |
| - "test_nested_dag.py", |
3552 |
| - "test_imports.py", |
3553 |
| - "__init__.py", |
3554 |
| - } |
3555 |
| - for root, _, files in os.walk(TEST_DAG_FOLDER): |
3556 |
| - for file_name in files: |
3557 |
| - if file_name.endswith((".py", ".zip")): |
3558 |
| - if file_name not in ignored_files: |
3559 |
| - expected_files.add(f"{root}/{file_name}") |
3560 |
| - for file_path in list_py_file_paths(TEST_DAG_FOLDER): |
3561 |
| - detected_files.add(file_path) |
3562 |
| - assert detected_files == expected_files |
3563 |
| - |
3564 | 3533 | def test_adopt_or_reset_orphaned_tasks_nothing(self):
|
3565 | 3534 | """Try with nothing."""
|
3566 | 3535 | scheduler_job = Job()
|
|
0 commit comments