Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ test:
--reruns 3 \
--reruns-delay 1

.PHONY: test-core
test-core: ## Run core libraries only; useful for local CI
@SKIP_PYSPARK_TESTS=1 \
SKIP_SQLITE_TESTS=1 \
SKIP_PARQUET_TESTS=1 \
uv run pytest \
--cov=pointblank \
--cov-report=term-missing \
--randomly-seed 123 \
-n auto \
--durations=10


test-update:
pytest --snapshot-update

Expand Down
18 changes: 15 additions & 3 deletions tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ class StrEnum(str, Enum):
except ImportError:
PYSPARK_AVAILABLE = False

## If we specifically disable tests in pytest set the availability to False
if os.environ.get("SKIP_PYSPARK_TESTS", "").lower() in ("true", "1", "yes"):
PYSPARK_AVAILABLE = False
SQLITE_AVAILABLE = True
if os.environ.get("SKIP_SQLITE_TESTS", "").lower() in ("true", "1", "yes"):
SQLITE_AVAILABLE = False
PARQUET_AVAILABLE = True
if os.environ.get("SKIP_PARQUET_TESTS", "").lower() in ("true", "1", "yes"):
PARQUET_AVAILABLE = False

from great_tables import vals
import great_tables as GT
Expand Down Expand Up @@ -180,12 +189,15 @@ def get_spark_session():
TBL_LIST = [
"tbl_pd",
"tbl_pl",
"tbl_parquet",
"tbl_duckdb",
"tbl_sqlite",
]

# Add PySpark to lists if available
if PARQUET_AVAILABLE:
TBL_LIST.append("tbl_parquet")

if SQLITE_AVAILABLE:
TBL_LIST.append("tbl_sqlite")

if PYSPARK_AVAILABLE:
TBL_LIST.append("tbl_pyspark")

Expand Down
Loading