File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import os
2-
3- import pytest
4-
5- from airflow .models import DagBag
6- from airflow .utils import db
7- import logging
1+ # import os
2+ #
3+ # import pytest
4+ #
5+ # from airflow.models import DagBag
6+ # from airflow.utils import db
7+ # import logging
88
99from tests import TESTS_PATH
1010
1111AIRFLOW_DAG_FOLDER = TESTS_PATH .parent .resolve () / "dags"
1212
1313
14- @pytest .fixture (scope = "session" )
15- def dag_bag ():
16- os .environ ["AIRFLOW_HOME" ] = str (AIRFLOW_DAG_FOLDER )
17- os .environ ["AIRFLOW__CORE__LOAD_EXAMPLES" ] = "False"
18- # Initialising the Airflow DB so that it works properly with the new AIRFLOW_HOME
19- logging .disable (logging .CRITICAL )
20- db .resetdb ()
21- db .initdb ()
22- logging .disable (logging .NOTSET )
23- dag_bag = DagBag (dag_folder = AIRFLOW_DAG_FOLDER , include_examples = False ,
24- read_dags_from_db = False )
25- return dag_bag
14+ # @pytest.fixture(scope="session")
15+ # def dag_bag():
16+ # os.environ["AIRFLOW_HOME"] = str(AIRFLOW_DAG_FOLDER)
17+ # os.environ["AIRFLOW__CORE__LOAD_EXAMPLES"] = "False"
18+ # # Initialising the Airflow DB so that it works properly with the new AIRFLOW_HOME
19+ # logging.disable(logging.CRITICAL)
20+ # db.resetdb()
21+ # db.initdb()
22+ # logging.disable(logging.NOTSET)
23+ # dag_bag = DagBag(dag_folder=AIRFLOW_DAG_FOLDER, include_examples=False,
24+ # read_dags_from_db=False)
25+ # return dag_bag
You can’t perform that action at this time.
0 commit comments