Skip to content

Testing

pip install "drivine[testing]" adds a pytest plugin. With

[tool.pytest.ini_options]
drivine_test_containers = true

it starts a container for each datasource the environment configures, Neo4j, Memgraph, FalkorDB or Oracle, before the tests run, and points the datasource at it. Datasources of one type share a container. USE_LOCAL_NEO4J=true (or _MEMGRAPH, _FALKORDB, _ORACLE) leaves that type’s datasources as they are, to test against your own instance, and NEO4J_TEST_IMAGE picks another image.

Drivine’s own tests run on Oracle only with ORACLE_TESTS=true: its image is large, and the database wants two gigabytes.