Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kulgan/pytest-psqlgraph
psqlgraph pytest plugin
https://github.com/kulgan/pytest-psqlgraph
gdcdictionary psqlgraph pytest pytest-plugin testing
Last synced: about 2 months ago
JSON representation
psqlgraph pytest plugin
- Host: GitHub
- URL: https://github.com/kulgan/pytest-psqlgraph
- Owner: kulgan
- License: apache-2.0
- Created: 2019-11-05T06:01:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T12:42:14.000Z (8 months ago)
- Last Synced: 2024-11-16T14:09:57.617Z (2 months ago)
- Topics: gdcdictionary, psqlgraph, pytest, pytest-plugin, testing
- Language: Python
- Homepage: https://pytest-psqlgraph.readthedocs.io
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
================
pytest-psqlgraph
================|Pypi version| |ci| |Documentation Status| |Python versions|
An extension for `pytest `_ provide useful tools for testing applications that use `psqlgraph `_
------------
How to Start
------------Install dependency ::
pip install pytest-psqlgraph
Define a session scoped ``psqlgraph_config`` fixture in ``conftest.py``:
.. code-block:: python
import pytest
@pytest.fixture(scope="session")
def psqlgraph_config() -> Dict[str, DatabaseDriverConfig]:
return {
"pg_driver": DatabaseDriverConfig(
host="localhost",
user="username",
password="pword",
database="db_name",
model=active_model,
dictionary=active_dictionary
)
}All set to start using the fixture ``pg_driver`` or whatever key was defined in the dictionary above
.. code-block:: python
def test_something(pg_driver):
with pg_driver.session_scoped() as s:
s.add(Node(..))Contributing
------------
Don't hesitate to create a `Github issue `__ for any bugs or suggestions or submit a PR... |PyPI version| image:: https://img.shields.io/pypi/v/pytest-psqlgraph.svg
:target: https://pypi.python.org/pypi/pytest-psqlgraph
:alt: PyPi version.. |conda-forge version| image:: https://img.shields.io/conda/vn/conda-forge/pytest-psqlgraph.svg
:target: https://anaconda.org/conda-forge/pytest-psqlgraph
:alt: conda-forge version.. |ci| image:: https://github.com/kulgan/pytest-psqlgraph/workflows/ci/badge.svg
:target: https://github.com/kulgan/pytest-psqlgraph/actions
:alt: CI status.. |Python versions| image:: https://img.shields.io/pypi/pyversions/pytest-psqlgraph.svg
:target: https://pypi.org/project/pytest-psqlgraph
:alt: PyPi downloads.. |Documentation status| image:: https://readthedocs.org/projects/pytest-psqlgraph/badge/?version=latest
:target: https://pytest-psqlgraph.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status