https://github.com/crate/pytest-cratedb
A pytest plugin for CrateDB.
https://github.com/crate/pytest-cratedb
cratedb cratedb-client cratedb-connector cratedb-driver pytest pytest-fixtures pytest-plugin test-tool test-utility testing-library testing-tools
Last synced: 3 months ago
JSON representation
A pytest plugin for CrateDB.
- Host: GitHub
- URL: https://github.com/crate/pytest-cratedb
- Owner: crate
- License: apache-2.0
- Created: 2023-10-24T18:32:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-10T04:30:58.000Z (4 months ago)
- Last Synced: 2026-02-11T01:19:25.867Z (4 months ago)
- Topics: cratedb, cratedb-client, cratedb-connector, cratedb-driver, pytest, pytest-fixtures, pytest-plugin, test-tool, test-utility, testing-library, testing-tools
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
==============
Pytest CrateDB
==============
.. image:: https://github.com/crate/pytest-cratedb/actions/workflows/tests.yml/badge.svg
:target: https://github.com/crate/pytest-cratedb/actions/workflows/tests.yml
:alt: Build status
.. image:: https://img.shields.io/pypi/status/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: Status
.. image:: https://codecov.io/gh/crate/pytest-cratedb/graph/badge.svg?token=OGZKWMMGMN
:target: https://app.codecov.io/gh/crate/pytest-cratedb
:alt: Coverage
.. image:: https://static.pepy.tech/badge/pytest-cratedb/month
:target: https://pepy.tech/project/pytest-cratedb
:alt: PyPI Downloads
|
.. image:: https://img.shields.io/pypi/v/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: PyPI Version
.. image:: https://img.shields.io/pypi/l/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: License
.. image:: https://img.shields.io/pypi/pyversions/pytest-cratedb.svg
:target: https://pypi.org/project/pytest-cratedb/
:alt: 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.
.. code-block:: python
>>> 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
======================
- `Software testing with CrateDB`_
- `CrateDB Python Client documentation`_
- `CrateDB reference documentation`_
- `CrateDB cr8 utilities`_
- Other `support channels`_
Contributions
=============
The Pytest CrateDB Plugin is an open source project, and is `managed on
GitHub`_. We appreciate contributions of any kind.
.. _crate-python: https://pypi.org/project/crate/
.. _CrateDB: https://github.com/crate/crate
.. _CrateDB Python Client documentation: https://cratedb.com/docs/python/
.. _CrateDB cr8 utilities: https://github.com/mfussenegger/cr8/
.. _CrateDB reference documentation: https://cratedb.com/docs/reference/
.. _DB API 2.0: https://peps.python.org/pep-0249/
.. _managed on GitHub: https://github.com/crate/pytest-cratedb
.. _PyPI: https://pypi.org/
.. _pytest: https://docs.pytest.org
.. _pytest-crate: https://pypi.org/project/pytest-crate/
.. _pytest-cratedb: https://pypi.org/project/pytest-cratedb/
.. _Software testing with CrateDB: https://cratedb.com/docs/guide/topic/testing/
.. _support channels: https://cratedb.com/support/