1 parent 44fb893 commit 3353b98Copy full SHA for 3353b98
1 file changed
tests/test_engine.py
@@ -23,6 +23,16 @@
23
)
24
25
26
+def _has_pytz() -> bool:
27
+ """Check if pytz is available (needed for DuckDB TIMESTAMPTZ)."""
28
+ try:
29
+ import pytz # noqa: F401
30
+
31
+ return True
32
+ except ImportError:
33
+ return False
34
35
36
class TestBuildBasic:
37
"""Core build functionality tests."""
38
@@ -1390,6 +1400,9 @@ def test_duplicate_warns_on_keep_any(self, tmp_path):
1390
1400
class TestTimezoneMismatch:
1391
1401
"""Build should raise TimefenceTimezoneError when tz-aware meets tz-naive."""
1392
1402
1403
+ @pytest.mark.skipif(
1404
+ not _has_pytz(), reason="pytz required for TIMESTAMPTZ support in DuckDB"
1405
+ )
1393
1406
def test_tz_aware_labels_vs_naive_features(self, tmp_path):
1394
1407
"""TIMESTAMPTZ labels + TIMESTAMP features → timezone error."""
1395
1408
conn = duckdb.connect()
0 commit comments