Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 8444a60

Browse files
committed
Add conftest.py to ignore comprehensive tests in CI
1 parent 13be7a8 commit 8444a60

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

conftest.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""
2+
Pytest configuration file that handles CI-specific test configuration.
3+
This file ensures comprehensive tests are skipped in CI environments.
4+
"""
5+
6+
import os
7+
8+
# Only import pytest if the module is available
9+
try:
10+
import pytest
11+
PYTEST_AVAILABLE = True
12+
except ImportError:
13+
PYTEST_AVAILABLE = False
14+
15+
def pytest_ignore_collect(path):
16+
"""
17+
Determine which test files to ignore during collection.
18+
19+
Args:
20+
path: Path object representing a test file or directory
21+
22+
Returns:
23+
bool: True if the file should be ignored, False otherwise
24+
"""
25+
# Check if we're running in CI
26+
in_ci = os.environ.get('CI', 'false').lower() == 'true'
27+
28+
if in_ci:
29+
# Skip comprehensive test files in CI environments
30+
if '_comprehensive' in str(path):
31+
return True
32+
33+
return False

0 commit comments

Comments
 (0)