Skip to content

Commit f391865

Browse files
authored
NO-SNOW: Disable flaky AI tests for a while. (#4240)
1 parent 1253e7e commit f391865

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/conftest.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
44
#
5+
import datetime
56
import doctest
67
import logging
78
import os
@@ -100,6 +101,16 @@ def pytest_collection_modifyitems(config, items):
100101
This function is used to skip some doctests on certain conditions.
101102
For example, some functions in PrPr might not be available on Azure and GCP.
102103
"""
104+
# Mark flaky tests as xfail for a time
105+
if datetime.date.today() <= datetime.date(2026, 6, 4):
106+
xfail_ai = pytest.mark.xfail(
107+
reason="dataframe_ai_functions doctests flaky due to infrastructure issues",
108+
strict=False,
109+
)
110+
for item in items:
111+
if isinstance(item, DoctestItem) and "dataframe_ai" in item.name:
112+
item.add_marker(xfail_ai)
113+
103114
host = (
104115
conn_params.get("host") or conn_params.get("HOST") or conn_params.get("account")
105116
)
@@ -113,6 +124,6 @@ def pytest_collection_modifyitems(config, items):
113124
for item in items:
114125
# identify doctest items
115126
if isinstance(item, DoctestItem):
116-
# match by the test’s “name (module.name)
127+
# match by the test's "name" (module.name)
117128
if any(test_name in item.name for test_name in disabled_doctests):
118129
item.add_marker(skip)

tests/integ/test_dataframe_ai.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33
#
44

5+
import datetime
56
import json
67
import pytest
78
from snowflake.snowpark.functions import ai_complete, col, lit, to_file
@@ -15,6 +16,11 @@
1516
"config.getoption('local_testing_mode', default=False)",
1617
reason="AI functions are not yet supported in local testing mode.",
1718
),
19+
pytest.mark.xfail(
20+
datetime.date.today() <= datetime.date(2026, 6, 4),
21+
reason="AI tests flaky due to infrastructure issues",
22+
strict=False,
23+
),
1824
]
1925

2026

0 commit comments

Comments
 (0)