This is an automated email from the ASF dual-hosted git repository.
shahar1 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 b935b90c5b4 Remove redundant tests from airflow-core (#68513)
b935b90c5b4 is described below
commit b935b90c5b4c99551ae5669fa7e7d41e4a884fa8
Author: Shahar Epstein <[email protected]>
AuthorDate: Sat Jun 13 23:44:27 2026 +0300
Remove redundant tests from airflow-core (#68513)
---
.../tests/unit/cli/commands/test_kerberos_command.py | 10 ----------
airflow-core/tests/unit/executors/test_base_executor.py | 15 ---------------
airflow-core/tests/unit/jobs/test_base_job.py | 10 ----------
airflow-core/tests/unit/logging/test_logging_config.py | 8 --------
.../unit/partition_mappers/test_rollup_wait_policy.py | 17 -----------------
5 files changed, 60 deletions(-)
diff --git a/airflow-core/tests/unit/cli/commands/test_kerberos_command.py
b/airflow-core/tests/unit/cli/commands/test_kerberos_command.py
index ac8ba911dda..3fc5a822a76 100644
--- a/airflow-core/tests/unit/cli/commands/test_kerberos_command.py
+++ b/airflow-core/tests/unit/cli/commands/test_kerberos_command.py
@@ -119,16 +119,6 @@ class TestKerberosCommand:
*python_3_13_close_calls,
]
- @mock.patch("airflow.cli.commands.kerberos_command.krb")
- @conf_vars({("core", "executor"): "CeleryExecutor"})
- def test_run_command_with_mode_standard(self, mock_krb):
- args = self.parser.parse_args(["kerberos", "PRINCIPAL", "--keytab",
"/tmp/airflow.keytab"])
-
- kerberos_command.kerberos(args)
- mock_krb.run.assert_called_once_with(
- keytab="/tmp/airflow.keytab", principal="PRINCIPAL",
mode=KerberosMode.STANDARD
- )
-
@mock.patch("airflow.cli.commands.kerberos_command.krb")
@conf_vars({("core", "executor"): "CeleryExecutor"})
def test_run_command_with_mode_one_time(self, mock_krb):
diff --git a/airflow-core/tests/unit/executors/test_base_executor.py
b/airflow-core/tests/unit/executors/test_base_executor.py
index 9c45c5056ca..f74d1f1e084 100644
--- a/airflow-core/tests/unit/executors/test_base_executor.py
+++ b/airflow-core/tests/unit/executors/test_base_executor.py
@@ -445,16 +445,6 @@ def test_state_queued():
assert executor.event_buffer[key] == (TaskInstanceState.QUEUED, info)
-def test_state_generic():
- executor = BaseExecutor()
- key = TaskInstanceKey("my_dag1", "my_task1", timezone.utcnow(), 1)
- executor.running.add(key)
- info = "info"
- executor.queued(key, info=info)
- assert not executor.running
- assert executor.event_buffer[key] == (TaskInstanceState.QUEUED, info)
-
-
def test_state_running():
executor = BaseExecutor()
key = TaskInstanceKey("my_dag1", "my_task1", timezone.utcnow(), 1)
@@ -649,11 +639,6 @@ class TestCallbackSupport:
executor = BaseExecutor()
assert executor.supports_callbacks is False
- def test_local_executor_supports_callbacks_true(self):
- """Test that LocalExecutor sets supports_callbacks to True."""
- executor = LocalExecutor()
- assert executor.supports_callbacks is True
-
@pytest.mark.db_test
def test_queue_callback_without_support_raises_error(self, dag_maker,
session):
executor = BaseExecutor() # supports_callbacks = False by default
diff --git a/airflow-core/tests/unit/jobs/test_base_job.py
b/airflow-core/tests/unit/jobs/test_base_job.py
index a38956c61bd..211e4128d01 100644
--- a/airflow-core/tests/unit/jobs/test_base_job.py
+++ b/airflow-core/tests/unit/jobs/test_base_job.py
@@ -56,16 +56,6 @@ class TestJob:
assert job.state == State.SUCCESS
assert job.end_date is not None
- def test_base_job_respects_plugin_hooks(self):
- import sys
-
- job = Job()
- job_runner = MockJobRunner(job=job, func=lambda: sys.exit(0))
- run_job(job=job, execute_callable=job_runner._execute)
-
- assert job.state == State.SUCCESS
- assert job.end_date is not None
-
def test_base_job_respects_plugin_lifecycle(self, dag_maker,
listener_manager):
"""
Test if DagRun is successful, and if Success callbacks is defined, it
is sent to DagFileProcessor.
diff --git a/airflow-core/tests/unit/logging/test_logging_config.py
b/airflow-core/tests/unit/logging/test_logging_config.py
index 04449a67419..3fffb376425 100644
--- a/airflow-core/tests/unit/logging/test_logging_config.py
+++ b/airflow-core/tests/unit/logging/test_logging_config.py
@@ -57,14 +57,6 @@ class TestGetLoggingConfig:
config = _get_logging_config()
assert config is custom
- def test_empty_string_falls_back_to_default(self):
- from airflow.config_templates.airflow_local_settings import
DEFAULT_LOGGING_CONFIG
-
- with mock.patch("airflow.logging_config.conf") as mocked_conf:
- mocked_conf.get.return_value = ""
- config = _get_logging_config()
- assert config == DEFAULT_LOGGING_CONFIG
-
@pytest.mark.parametrize(
"logging_class_path",
[pytest.param("", id="empty-string"), pytest.param(None, id="none")],
diff --git
a/airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py
b/airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py
index e5033322ddb..e2405675c0f 100644
--- a/airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py
+++ b/airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py
@@ -50,14 +50,6 @@ class TestPolicyConstruction:
def test_minimum_count_stores_n(self, n):
assert MinimumCount(n).n == n
- def test_wait_for_all_is_stateless(self):
- a = WaitForAll()
- b = WaitForAll()
- assert type(a) is WaitForAll
- assert type(b) is WaitForAll
- assert a == b
- assert hash(a) == hash(b)
-
def test_default_wait_policy_is_wait_for_all_instance(self, make_mapper):
mapper = make_mapper()
assert isinstance(mapper.wait_policy, WaitForAll)
@@ -113,15 +105,6 @@ class TestPolicySemantics:
assert policy.is_unreachable(expected) is unreachable
-class TestRepr:
- def test_wait_for_all_repr(self):
- assert repr(WaitForAll()) == "WaitForAll()"
-
- def test_minimum_count_repr(self):
- assert repr(MinimumCount(5)) == "MinimumCount(n=5)"
- assert repr(MinimumCount(-3)) == "MinimumCount(n=-3)"
-
-
class TestSerializeRoundTrip:
@pytest.mark.parametrize(
"policy",