Skip to content

Commit 3ccfa7b

Browse files
committed
fix: exclude test_azure_e2e.py from pytest collection
- Add collect_ignore in conftest.py (standalone script, not a pytest test) - Catch SystemExit in test_azure_e2e.py fallback (pytest.skip raises BaseException)
1 parent ec21c7a commit 3ccfa7b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

test/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
from __future__ import annotations
2424

25+
# test_azure_e2e.py is a standalone script (python test/test_azure_e2e.py),
26+
# not a pytest test — exclude it from collection.
27+
collect_ignore = ["test_azure_e2e.py"]
28+
2529
import logging
2630
import os
2731
import sys

test/test_azure_e2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
try:
4444
from test.conftest import _sync_all_test_data, CACHE_DIR, LOCAL_DATA_DIR
4545
TEST_DATA_DIR = _sync_all_test_data()
46-
except Exception:
47-
# Fallback for standalone script execution
46+
except (Exception, SystemExit):
47+
# Fallback for standalone script execution or missing Azure connection
4848
TEST_DATA_DIR = Path(__file__).parent / "test_data"
4949
if not TEST_DATA_DIR.exists():
5050
TEST_DATA_DIR = Path(__file__).parent / ".test_data_cache"

0 commit comments

Comments
 (0)