This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new fbb6639657 Fix 120 or so test_python tests in db_isolation mode
(#41173)
fbb6639657 is described below
commit fbb6639657b32ca0188ab14353b540efc9710f96
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Aug 1 14:49:29 2024 +0200
Fix 120 or so test_python tests in db_isolation mode (#41173)
Serialized dags are needed in a number of places where DB isolation
mode needs to work. This one adds seialization to test_python
tests to make them work.
---
tests/operators/test_python.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/operators/test_python.py b/tests/operators/test_python.py
index 728b5aae8d..66e3c9a823 100644
--- a/tests/operators/test_python.py
+++ b/tests/operators/test_python.py
@@ -69,7 +69,7 @@ from tests.test_utils.db import clear_db_runs
if TYPE_CHECKING:
from airflow.models.dagrun import DagRun
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.need_serialized_dag]
TI = TaskInstance
@@ -1734,6 +1734,7 @@ class TestCurrentContextRuntime:
op.run(ignore_first_depends_on_past=True, ignore_ti_state=True)
[email protected]_serialized_dag(False)
class TestShortCircuitWithTeardown:
@pytest.mark.parametrize(
"ignore_downstream_trigger_rules, with_teardown, should_skip,
expected",