From 5e0b0e6d6ee728d6590d2d14edabbf5e7a11f617 Mon Sep 17 00:00:00 2001 From: Bjarke Madsen <bjarke@nordu.net> Date: Thu, 27 Jul 2023 19:21:12 +0200 Subject: [PATCH] Fix tests and run tests in parallel --- brian_dashboard_manager/config.py | 2 +- test/__init__.py | 0 test/test_gws_direct.py | 2 +- test/test_update.py | 2 +- tox.ini | 11 +++-------- 5 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 test/__init__.py diff --git a/brian_dashboard_manager/config.py b/brian_dashboard_manager/config.py index 3b09bf0..b22ef4e 100644 --- a/brian_dashboard_manager/config.py +++ b/brian_dashboard_manager/config.py @@ -203,7 +203,7 @@ CONFIG_SCHEMA = { "datasources": { "type": "object", "properties": { - "influxdb": {"$ref": "#definitions/influx-datasource"} + "influxdb": {"$ref": "#/definitions/influx-datasource"} }, "additionalProperties": False }, diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_gws_direct.py b/test/test_gws_direct.py index 5ff6110..0a263c0 100644 --- a/test/test_gws_direct.py +++ b/test/test_gws_direct.py @@ -1,5 +1,5 @@ import responses -from conftest import get_test_data +from test.conftest import get_test_data from brian_dashboard_manager.templating.gws import generate_gws from brian_dashboard_manager.inventory_provider.interfaces import \ get_gws_direct diff --git a/test/test_update.py b/test/test_update.py index 55df28b..57b09f2 100644 --- a/test/test_update.py +++ b/test/test_update.py @@ -3,7 +3,7 @@ import json from brian_dashboard_manager.grafana.provision import provision_folder, \ provision -from conftest import get_test_data +from test.conftest import get_test_data TEST_INTERFACES = [ { diff --git a/tox.ini b/tox.ini index f2c726d..d6dc285 100644 --- a/tox.ini +++ b/tox.ini @@ -6,19 +6,14 @@ exclude = venv,.tox max-line-length = 120 [testenv] -setenv = - COVERAGE_PROCESS_START=.coveragerc deps = - coverage + pytest-xdist + pytest-cov flake8 -r requirements.txt commands = coverage erase - coverage run --source brian_dashboard_manager -m pytest {posargs} - coverage combine - coverage xml - coverage html - coverage report --fail-under 75 + pytest -n auto --cov brian_dashboard_manager --cov-report html --cov-report xml --cov-report term -p no:checkdocs flake8 sphinx-build -M html docs/source docs/build -- GitLab