Skip to content

Commit

Permalink
Limit test_airflow_context only for python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed May 3, 2024
1 parent e923a7f commit a2e2bb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/operators/test_python.py
Expand Up @@ -77,7 +77,6 @@
TEMPLATE_SEARCHPATH = os.path.join(AIRFLOW_MAIN_FOLDER, "tests", "config_templates")
LOGGER_NAME = "airflow.task.operators"
DEFAULT_PYTHON_VERSION = f"{sys.version_info[0]}.{sys.version_info[1]}"
PY311 = sys.version_info >= (3, 11)
DILL_INSTALLED = find_spec("dill") is not None
DILL_MARKER = pytest.mark.skipif(not DILL_INSTALLED, reason="`dill` is not installed")
CLOUDPICKLE_INSTALLED = find_spec("cloudpickle") is not None
Expand Down Expand Up @@ -1200,7 +1199,7 @@ def f(a):
self.run_as_task(f, venv_cache_path=tmp_dir, op_args=[4])

# This tests might take longer than default 60 seconds as it is serializing a lot of
# context using cloudpickle (which is slow apparently).
# context using dill/cloudpickle (which is slow apparently).
@pytest.mark.execution_timeout(120)
@pytest.mark.filterwarnings("ignore::airflow.utils.context.AirflowContextDeprecationWarning")
@pytest.mark.parametrize(
Expand All @@ -1211,7 +1210,7 @@ def f(a):
marks=[
DILL_MARKER,
pytest.mark.xfail(
PY311,
sys.version_info[:2] == (3, 11),
reason=(
"Also this test is failed on Python 3.11 because of impact of "
"regression in Python 3.11 connected likely with CodeType behaviour "
Expand Down

0 comments on commit a2e2bb2

Please sign in to comment.