Skip to content

crate/pytest-cratedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pytest CrateDB

Build status Status Coverage PyPI Downloads

PyPI Version License Python Version

pytest-cratedb is a plugin for pytest for writing integration tests that interact with CrateDB.

The CrateDB version can be specified using the --crate-version option when running pytest. By default, the latest stable version of CrateDB is used.

Usage

pytest-cratedb provides a pytest crate session fixture which downloads, starts and stops a CrateDB node.

>>> def test_database_access(crate):
...     # perform database access
...     ...

Examples

See tests/test_layer.py for further examples.

Migration Notes

This package, pytest-cratedb is a drop-in replacement for its predecessor package pytest-crate. It is recommended to uninstall pytest-crate before installing pytest-cratedb in your Python environment.

Documentation and Help

Development

Acquire the source code and invoke the software tests:

git clone https://github.com/crate/pytest-cratedb
cd pytest-cratedb
uv venv --python 3.14 --seed .venv
source .venv/bin/activate
uv pip install --upgrade --editable='.[develop,test,release]'
poe check

Format the code before submitting patches:

poe format

Contributions

The Pytest CrateDB Plugin is an open source project, and is managed on GitHub. We appreciate contributions of any kind.