From ed933b73b7d6a8cc3097ea86a8e74715535255fc Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Thu, 12 Jan 2023 13:38:53 +0100 Subject: [PATCH] Add initial tox configuration This sets up a default environment list for Python version 3.7, through 3.9 and moves the pytest config into tox.ini while we're at it. --- pytest.ini | 8 -------- tox.ini | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) delete mode 100644 pytest.ini create mode 100644 tox.ini diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 0ec78120..00000000 --- a/pytest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pytest] -testpaths: src -pythonpath: src -markers = - integration: mark a test that will only run on a fully integrated CNaaS-NMS deployment - equipment: mark a test that requires live equipment to be available for testing - -addopts = --docker-compose=../docker/docker-compose_pytest.yaml diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..41b5343e --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +# -*- indent-tabs-mode: nil; -*- +[tox] +envlist = py{37,38,39} +skipsdist = True +basepython = python3.7 + +[pytest] +testpaths = src +pythonpath = src +markers = + integration: mark a test that will only run on a fully integrated CNaaS-NMS deployment + equipment: mark a test that requires live equipment to be available for testing + +[testenv] +passenv = USER HOME + +deps = + -r requirements.txt + +commands = + pytest --docker-compose={toxinidir}/docker/docker-compose_pytest.yaml {posargs}