Metadata-Version: 2.4
Name: pytest-cratedb
Version: 0.4.1
Summary: Manage CrateDB instances for integration tests
Author-email: Christian Haudum <developer@christianhaudum.at>, Andreas Motl <andreas.motl@crate.io>
License: Apache License 2.0
Project-URL: Changelog, https://github.com/crate/pytest-cratedb/blob/main/CHANGES.rst
Project-URL: Issues, https://github.com/crate/pytest-cratedb/issues
Project-URL: Repository, https://github.com/crate/pytest-cratedb
Keywords: cratedb,integration test,pytest,software test
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: SQL
Classifier: Topic :: Adaptive Technologies
Classifier: Topic :: Communications
Classifier: Topic :: Database
Classifier: Topic :: Documentation
Classifier: Topic :: Education
Classifier: Topic :: Internet
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: System :: Clustering
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: cr8
Requires-Dist: crate
Requires-Dist: pytest<10
Provides-Extra: develop
Requires-Dist: mypy<1.20; extra == "develop"
Requires-Dist: poethepoet<1; extra == "develop"
Requires-Dist: pyproject-fmt<3; extra == "develop"
Requires-Dist: ruff<0.15; extra == "develop"
Requires-Dist: validate-pyproject<1; extra == "develop"
Provides-Extra: release
Requires-Dist: build<2; extra == "release"
Requires-Dist: twine<7; extra == "release"
Provides-Extra: test
Requires-Dist: pytest-cov<8; extra == "test"
Requires-Dist: pytest-mock<4; extra == "test"
Dynamic: license-file

==============
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 <https://github.com/crate/pytest-cratedb/blob/main/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/
