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 67301393a50 Remove unrequested core test fixtures (#75890)
67301393a50 is described below

commit 67301393a50e7fdcfe995b6263b7537fbb7202ed
Author: Hussein Awala <[email protected]>
AuthorDate: Thu Oct 29 06:21:01 2026 +0100

    Remove unrequested core test fixtures (#75890)
---
 airflow-core/tests/conftest.py | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/airflow-core/tests/conftest.py b/airflow-core/tests/conftest.py
index b4e3e66b6bd..a4ff359fb2a 100644
--- a/airflow-core/tests/conftest.py
+++ b/airflow-core/tests/conftest.py
@@ -17,7 +17,6 @@
 from __future__ import annotations
 
 import json
-import logging
 import os
 import sys
 import zipfile
@@ -27,8 +26,6 @@ from typing import TYPE_CHECKING
 
 import pytest
 
-from tests_common.test_utils.log_handlers import non_pytest_handlers
-
 # We should set these before loading _any_ of the rest of airflow so that the
 # unit test mode config is set as early as possible.
 assert "airflow" not in sys.modules, "No airflow module can be imported before 
these lines"
@@ -44,39 +41,6 @@ collect_ignore = [
 ]
 
 
[email protected]
-def reset_environment():
-    """Resets env variables."""
-    init_env = os.environ.copy()
-    yield
-    changed_env = os.environ
-    for key in changed_env:
-        if key not in init_env:
-            del os.environ[key]
-        else:
-            os.environ[key] = init_env[key]
-
-
-def remove_non_pytest_log_handlers(logger, *classes):
-    for handler in non_pytest_handlers(logger.handlers):
-        logger.removeHandler(handler)
-
-
-def remove_all_non_pytest_log_handlers():
-    # Remove handlers from the root logger
-    remove_non_pytest_log_handlers(logging.getLogger())
-    # Remove handlers from all other loggers
-    for logger_name in logging.root.manager.loggerDict:
-        remove_non_pytest_log_handlers(logging.getLogger(logger_name))
-
-
[email protected]
-def clear_all_logger_handlers():
-    remove_all_non_pytest_log_handlers()
-    yield
-    remove_all_non_pytest_log_handlers()
-
-
 @contextmanager
 def _config_bundles(bundles: dict[str, Path | str]):
     from tests_common.test_utils.config import conf_vars

Reply via email to