opencdms-dev / pyopencdms

⭐🐍 pyopencdms aims to build a common Python API on top of multiple Climate Data Management Systems (CDMS) that use different underlying database engines
MIT License
1 stars 2 forks source link

Set up tox to run unit and integration tests separately #3

Open isedwards opened 1 year ago

isedwards commented 1 year ago

Many developers will not want to run integrations tests for database backends that they are not working with.

In tox.ini we should be able to do something like:

[testenv]
setenv =
    PYTHONPATH = {toxinidir}
deps =
    -r{toxinidir}/requirements/base.txt
commands =
    pytest tests/unit

[testenv:surface]
deps =
    -r{toxinidir}/requirements/provider/surface.txt
commands =
    pytest test/integration/surface

and then run tox -e surface to run the integration tests for surface.

Currently we're confused about where the database containers exist that should be used for running integration tests. The old opencdms-dev/pyopencdms contained docker files and we now also have cdm-database.

However, integration tests should run against the containers in the opencdms-test-data repository.