Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix running tests locally (outside of the CI) #227

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/test_dagbuilder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import datetime
from pathlib import Path
from unittest.mock import patch

import pendulum
Expand Down Expand Up @@ -47,7 +48,9 @@
MappedOperator = None
# pylint: disable=ungrouped-imports,invalid-name

here = os.path.dirname(__file__)
here = Path(__file__).parent

PROJECT_ROOT_PATH = str(here.parent)

DEFAULT_CONFIG = {
"default_args": {
Expand Down Expand Up @@ -654,8 +657,8 @@ def test_get_dag_params_with_template_searchpath():
td.get_dag_params()

assert utils.check_template_searchpath(123) == False
assert utils.check_template_searchpath("/home/runner/work") == True
assert utils.check_template_searchpath(["/home/runner/work"]) == True
assert utils.check_template_searchpath(PROJECT_ROOT_PATH) == True
assert utils.check_template_searchpath([PROJECT_ROOT_PATH]) == True


def test_get_dag_params_with_render_template_as_native_obj():
Expand Down
Loading