From 01e92b017376211c884dd34ebba6f3d8b9bf66e2 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 25 Jun 2023 15:31:24 -0700 Subject: [PATCH] Skip SpatiaLite tests with sqlean.py Refs https://github.com/nalgeon/sqlean/issues/87 --- tests/test_gis.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_gis.py b/tests/test_gis.py index 3b1fbf1..ee2e2a3 100644 --- a/tests/test_gis.py +++ b/tests/test_gis.py @@ -6,6 +6,12 @@ from sqlite_utils.cli import cli from sqlite_utils.db import Database from sqlite_utils.utils import find_spatialite, sqlite3 +try: + import sqlean +except ImportError: + sqlean = None + + pytestmark = [ pytest.mark.skipif( not find_spatialite(), reason="Could not find SpatiaLite extension" @@ -14,6 +20,9 @@ pytestmark = [ not hasattr(sqlite3.Connection, "enable_load_extension"), reason="sqlite3.Connection missing enable_load_extension", ), + pytest.mark.skipif( + sqlean is not None, reason="sqlean.py is not compatible with SpatiaLite" + ), ]