Skip to content

Commit 7821f3f

Browse files
committed
add options to skip tests
1 parent 5a4675b commit 7821f3f

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ test:
1010
--reruns 3 \
1111
--reruns-delay 1
1212

13+
.PHONY: test-core
14+
test-core: ## Run core libraries only; useful for local CI
15+
@SKIP_PYSPARK_TESTS=1 \
16+
SKIP_SQLITE_TESTS=1 \
17+
SKIP_PARQUET_TESTS=1 \
18+
uv run pytest \
19+
--cov=pointblank \
20+
--cov-report=term-missing \
21+
--randomly-seed 123 \
22+
-n auto \
23+
--durations=10
24+
25+
1326
test-update:
1427
pytest --snapshot-update
1528

tests/test_validate.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ class StrEnum(str, Enum):
7575
except ImportError:
7676
PYSPARK_AVAILABLE = False
7777

78+
## If we specifically disable tests in pytest set the availability to False
79+
if os.environ.get("SKIP_PYSPARK_TESTS", "").lower() in ("true", "1", "yes"):
80+
PYSPARK_AVAILABLE = False
81+
if os.environ.get("SKIP_SQLITE_TESTS", "").lower() in ("true", "1", "yes"):
82+
SQLITE_AVAILABLE = False
83+
if os.environ.get("SKIP_PARQUET_TESTS", "").lower() in ("true", "1", "yes"):
84+
PARQUET_AVAILABLE = False
7885

7986
from great_tables import vals
8087
import great_tables as GT
@@ -180,12 +187,15 @@ def get_spark_session():
180187
TBL_LIST = [
181188
"tbl_pd",
182189
"tbl_pl",
183-
"tbl_parquet",
184190
"tbl_duckdb",
185-
"tbl_sqlite",
186191
]
187192

188-
# Add PySpark to lists if available
193+
if PARQUET_AVAILABLE:
194+
TBL_LIST.append("tbl_parquet")
195+
196+
if SQLITE_AVAILABLE:
197+
TBL_LIST.append("tbl_sqlite")
198+
189199
if PYSPARK_AVAILABLE:
190200
TBL_LIST.append("tbl_pyspark")
191201

0 commit comments

Comments
 (0)