Runs the upstream typopo JavaScript test suite against the pytypopo Python port to verify parity.
┌────────────────┐ HTTP POST ┌───────────────┐
│ Vitest (JS) │ ────────────────▶ │ Python Bridge │
│ upstream tests │ ◀──────────────── │ (http server) │
└────────────────┘ JSON response └───────────────┘
pytypopo
- Python Bridge (
python_bridge.py) - HTTP server that exposes pytypopo functions - JS Adapter (
js-adapter/) - Modified test utilities that redirect function calls to Python - Upstream Tests (
typopo/) - Clone of the original typopo repo with all tests
# Run all cross-tests
./run-cross-tests.sh
# Or manually:
uv run python python_bridge.py 9876 &
cd js-adapter && npm test- Passed tests = Python produces same output as JS ✅
- Failed tests = Parity issues to investigate
⚠️ - Skipped tests = Helper functions not exposed in Python ⏭️
To pull latest upstream tests:
cd typopo
git pull origin mainIf tests fail with "Unknown function", add the function to python_bridge.py:
FUNCTION_MAP = {
# ...existing functions...
'newFunction': (new_function, True, False), # (func, needs_locale, needs_config)
}Some intentional differences between Python and JS:
- (Document any known/accepted differences here)