Skip to content

Testing Overview

The ArcadeDB Python bindings have a comprehensive test suite covering all major functionality.

Quick Statistics

Test Results

  • Current package: ✅ 290 passed
  • Environment-specific skips may vary depending on optional components

What's Tested

The test suite covers:

  • Core database operations - CRUD, transactions, queries
  • Server mode - HTTP API, multi-client access
  • Concurrency patterns - File locking, thread safety, multi-process
  • Graph operations - Vertices, edges, traversals
  • Query languages - SQL, OpenCypher
  • Vector search - HNSW (JVector) based Vector indexes, similarity search
  • Data import - CSV with batch commits and type inference
  • Graph ingest helper - GraphBatch buffering and flush behavior
  • Geospatial SQL - geo.within, geo.intersects, null/boundary semantics
  • Time series SQL - CREATE TIMESERIES TYPE, range queries, bucketing
  • Materialized views - create, refresh, alter, drop lifecycle
  • Graph algorithms - shortestPath, dijkstra, astar
  • HASH schema indexes - create, discover, idempotent drop behavior
  • Unicode support - International characters, emoji
  • Schema introspection - Querying database metadata
  • Type conversions - Python/Java type mapping
  • Large datasets - Handling 1000+ records efficiently

Quick Start

Install Test Dependencies

uv pip install pytest pytest-cov

Run All Tests

# From the bindings/python directory
pytest

# With verbose output
pytest -v

# With coverage report
pytest --cov=arcadedb_embedded --cov-report=html

Run Specific Tests

# Run a specific test file
pytest tests/test_core.py

# Run a specific test function
pytest tests/test_core.py::test_database_creation

# Run tests matching a keyword
pytest -k "transaction"
pytest -k "server"
pytest -k "concurrency"

# Run with output (see print statements)
pytest -v -s

Test Files Overview

Test counts evolve over time. For the latest per-file counts, run pytest -v -rs.

Test File Description
test_core.py Core database operations, CRUD, transactions, queries
test_server.py Server mode, HTTP API, configuration
test_concurrency.py File locking, thread safety, multi-process behavior
test_server_patterns.py Best practices for embedded + server mode
test_import_database.py SQL IMPORT DATABASE scenarios and format coverage
test_docs_examples.py Executes representative Python snippets from the documentation site
test_cypher.py OpenCypher query language
test_graph_batch.py Bulk graph-ingest helper coverage
test_geo_predicate_sql.py Geospatial SQL predicate semantics
test_timeseries_sql.py Time-series SQL type creation, range filters, and bucketing
test_materialized_view_sql.py Materialized view lifecycle and refresh behavior
test_graph_algorithms_sql.py SQL graph algorithm runtime coverage
test_hash_index_schema.py HASH index schema API behavior
test_jvm_args.py JVM args handling
test_vector_params_verification.py Vector param validation

Common Testing Workflows

Development Workflow

# Watch mode - rerun tests on file changes
pytest --watch

# Run only failed tests from last run
pytest --lf

# Run tests in parallel (faster)
pytest -n auto

Debugging Tests

# Stop on first failure
pytest -x

# Drop into debugger on failure
pytest --pdb

# Show local variables on failure
pytest -l

# Verbose with full output
pytest -vv -s

Test Markers

Tests are organized with pytest markers:

# Run only server tests
pytest -m server

# Run only OpenCypher tests
pytest -k cypher

# Run all except slow tests
pytest -m "not slow"

Expected Output

When the current bindings test suite passes, you should see a clean all-green summary.

======================== 290 passed ========================

Next Steps