Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
radujica committed Dec 19, 2024
1 parent 3d11495 commit 80bc2f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/models/test_dagbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,13 @@ def test_dagbag_dag_collection(self):
dagbag = DagBag(dag_folder=TEST_DAGS_FOLDER, include_examples=False)
assert dagbag.dags

def test_dagbag_collect_dags_stats_have_filepath_without_dag_folder(self):
with conf_vars({("core", "DAGS_FOLDER"): "/different/path"}):
dagbag = DagBag(dag_folder=TEST_DAGS_FOLDER, include_examples=False)

assert dagbag.dagbag_stats
assert str(TEST_DAGS_FOLDER) not in dagbag.dagbag_stats[0].file

def test_dabgag_captured_warnings(self):
dag_file = os.path.join(TEST_DAGS_FOLDER, "test_dag_warnings.py")
dagbag = DagBag(dag_folder=dag_file, include_examples=False, collect_dags=False)
Expand Down

0 comments on commit 80bc2f9

Please sign in to comment.