Skip to content

Commit bda490c

Browse files
committed
Fix test_spacial_processing.py to match server.py's SpatiaLite detection.
1 parent 6ea4835 commit bda490c

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQLite MCP Server
22

3-
*Last Updated: September 18, 2025 2:23 AM EST*
3+
*Last Updated: September 18, 2025 2:55 AM EST*
44

55
*Enterprise-grade SQLite with AI-native capabilities – v2.4.0*
66

docs/FULL-README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQLite MCP Server
22

3-
*Last Updated: September 19, 2025 2:23 AM EST – v2.4.0*
3+
*Last Updated: September 19, 2025 2:55 AM EST – v2.4.0*
44

55
[![Docker Pulls](https://img.shields.io/docker/pulls/writenotenow/sqlite-mcp-server)](https://hub.docker.com/r/writenotenow/sqlite-mcp-server)
66
![License](https://img.shields.io/badge/license-MIT-blue)
@@ -74,7 +74,7 @@ python test_runner.py --quick
7474
python test_runner.py --standard
7575

7676
# Full test suite with edge cases
77-
python test_runner.py --full
77+
Fix
7878
```
7979

8080
**Expected output:**

docs/readme_sqlite_mcp_docker_repo.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQLite MCP Server
22

3-
*Last Updated: September 19, 2025 2:23 AM EST – v2.4.0*
3+
*Last Updated: September 19, 2025 2:55 AM EST – v2.4.0*
44

55
[![Docker Pulls](https://img.shields.io/docker/pulls/writenotenow/sqlite-mcp-server)](https://hub.docker.com/r/writenotenow/sqlite-mcp-server)
66
![License](https://img.shields.io/badge/license-MIT-blue)
@@ -76,17 +76,17 @@ docker run -i --rm \
7676

7777
## ✅ Quick Test - Verify Everything Works
7878

79-
**NEW in v2.4.0: Enhanced Windows compatibility + optimized container size!**
79+
**Test all 67 tools in 30 seconds:**
8080

8181
```bash
82-
# Run comprehensive test in Docker
83-
docker run -i --rm \
84-
-v $(pwd):/workspace \
85-
writenotenow/sqlite-mcp-server:v2.4.0 \
86-
--test --quick
82+
# Quick smoke test
83+
python test_runner.py --quick
8784

88-
# Or test specific installation
89-
docker run -i --rm writenotenow/sqlite-mcp-server:v2.4.0 --test --standard
85+
# Standard comprehensive test (recommended)
86+
python test_runner.py --standard
87+
88+
# Full test suite with edge cases
89+
python test_runner.py --full
9090
```
9191

9292
**Expected output:**
@@ -107,11 +107,6 @@ docker run -i --rm writenotenow/sqlite-mcp-server:v2.4.0 --test --standard
107107
🎉 SUCCESS: 63/67 tools tested successfully!
108108
```
109109

110-
**Test Levels:**
111-
- `--test --quick`
112-
- `--test --standard`
113-
- `--test --full`
114-
115110
## Key Features
116111

117112
### 🆕 **NEW in v2.4.0: Windows GeomFromText Compatibility + Container Optimization**

tests/test_comprehensive.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,27 @@ def detect_environment(self) -> Dict[str, Any]:
166166
try:
167167
conn = sqlite3.connect(":memory:")
168168
conn.enable_load_extension(True)
169-
# Try common SpatiaLite locations
169+
170+
# Use same detection logic as the main server
171+
import os
172+
script_dir = os.path.dirname(os.path.dirname(__file__))
173+
local_spatialite_dir = os.path.join(script_dir, "mod_spatialite-5.1.0-win-amd64")
174+
local_spatialite = os.path.join(local_spatialite_dir, "mod_spatialite.dll")
175+
176+
# Add local SpatiaLite directory to PATH for Windows DLL dependencies
177+
if os.path.exists(local_spatialite_dir):
178+
original_path = os.environ.get('PATH', '')
179+
if local_spatialite_dir not in original_path:
180+
os.environ['PATH'] = local_spatialite_dir + os.pathsep + original_path
181+
182+
# Try SpatiaLite locations (same order as server)
170183
spatialite_paths = [
184+
local_spatialite, # Local installation first
171185
"mod_spatialite",
172186
"mod_spatialite.dll",
187+
"mod_spatialite.so",
173188
"/usr/lib/x86_64-linux-gnu/mod_spatialite.so",
189+
"/usr/local/lib/mod_spatialite.so",
174190
"/usr/local/lib/mod_spatialite.dylib"
175191
]
176192

0 commit comments

Comments
 (0)