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

Resolve core unit test internal warning #38835

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions tests/core/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ def test_externally_triggered_dagrun(self, dag_maker):

with dag_maker(schedule=timedelta(weeks=1)):
task = EmptyOperator(task_id="test_externally_triggered_dag_context")
dag_maker.create_dagrun(
dr = dag_maker.create_dagrun(
run_type=DagRunType.SCHEDULED,
execution_date=execution_date,
external_trigger=True,
)
task.run(start_date=execution_date, end_date=execution_date)

ti = TI(task=task, execution_date=execution_date)
ti = TI(task=task, run_id=dr.run_id)
context = ti.get_template_context()

# next_ds should be the execution date for manually triggered runs
Expand All @@ -169,14 +169,14 @@ def test_dag_params_and_task_params(self, dag_maker):
params={"key_2": "value_2_new", "key_3": "value_3"},
)
task2 = EmptyOperator(task_id="task2")
dag_maker.create_dagrun(
dr = dag_maker.create_dagrun(
run_type=DagRunType.SCHEDULED,
external_trigger=True,
)
task1.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
task2.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
ti1 = TI(task=task1, execution_date=DEFAULT_DATE)
ti2 = TI(task=task2, execution_date=DEFAULT_DATE)
ti1 = TI(task=task1, run_id=dr.run_id)
ti2 = TI(task=task2, run_id=dr.run_id)
context1 = ti1.get_template_context()
context2 = ti2.get_template_context()

Expand Down
3 changes: 0 additions & 3 deletions tests/deprecations_ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@


# Core
- tests/core/test_core.py::TestCore::test_dag_params_and_task_params
- tests/core/test_core.py::TestCore::test_externally_triggered_dagrun
- tests/core/test_impersonation_tests.py::TestImpersonation::test_impersonation_subdag
Taragolis marked this conversation as resolved.
Show resolved Hide resolved
- tests/core/test_stats.py::TestCustomStatsName::test_does_not_send_stats_using_statsd_when_the_name_is_not_valid
- tests/core/test_stats.py::TestCustomStatsName::test_does_send_stats_using_statsd_when_the_name_is_valid
- tests/core/test_stats.py::TestPatternOrBasicValidatorConfigOption::test_pattern_or_basic_picker
Expand Down