Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions airflow-core/tests/unit/cli/commands/test_kerberos_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,6 @@ def test_run_command_daemon(self, mock_krb, mock_daemon, mock_setup_locations, m
*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):
Expand Down
15 changes: 0 additions & 15 deletions airflow-core/tests/unit/executors/test_base_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -649,11 +639,6 @@ def test_supports_callbacks_flag_default_false(self):
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
Expand Down
10 changes: 0 additions & 10 deletions airflow-core/tests/unit/jobs/test_base_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ def test_state_sysexit(self):
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.
Expand Down
8 changes: 0 additions & 8 deletions airflow-core/tests/unit/logging/test_logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ def test_user_defined_dict_is_imported(self, monkeypatch):
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")],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ def test_minimum_count_zero_rejected(self):
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)
Expand Down Expand Up @@ -113,15 +105,6 @@ def test_is_unreachable(self, policy, expected, unreachable):
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",
Expand Down
Loading