diff --git a/pyproject.toml b/pyproject.toml index e55113be..722cbf92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -216,3 +216,14 @@ pythonVersion = "3.8" typeCheckingMode = "strict" useLibraryCodeForTypes = true reportGeneralTypeIssues = true + +[tool.pytest.ini_options] +addopts = "-ra -v" +asyncio_default_fixture_loop_scope = "function" +asyncio_mode = "auto" +filterwarnings = "ignore::DeprecationWarning:websockets" +markers = [ + "serial: mark a test that must run by itself", + "wait_for_idle: mark a test that waits for the model to be idle", + "bundle: mark a test that uses a bundle", +] diff --git a/tests/validate/__init__.py b/tests/validate/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tox.ini b/tox.ini index db3bf4ff..0e97e6c8 100644 --- a/tox.ini +++ b/tox.ini @@ -8,21 +8,12 @@ envlist = py3,py38,py39,py310,py311,docs skipsdist=True -[pytest] -markers = - serial: mark a test that must run by itself - wait_for_idle: mark a test that waits for the model to be idle - bundle: mark a test that uses a bundle -asyncio_mode = auto -filterwarnings = - ignore::DeprecationWarning:websockets - [testenv] usedevelop=True commands = pip install urllib3<2 pip install pylxd - python -m pytest --tb native -ra -v -s -k 'not integration' -m 'not serial' {posargs} + pytest --tb native -s -k 'not integration' -m 'not serial' {posargs} passenv = HOME TEST_AGENTS @@ -33,7 +24,6 @@ deps = typing-inspect paramiko ipdb - mock pytest pytest-asyncio Twine @@ -57,9 +47,8 @@ envdir = {toxworkdir}/py3 commands = pip install urllib3<2 pip install pylxd - python -m pytest \ + pytest \ --tb native \ - -ra -v \ -k 'integration' \ --ignore {toxinidir}/tests/integration/test_crossmodel.py \ --ignore {toxinidir}/tests/integration/test_model.py \ @@ -71,9 +60,8 @@ envdir = {toxworkdir}/py3 commands = pip install urllib3<2 pip install pylxd - python -m pytest \ + pytest \ --tb native \ - -ra -v \ -m 'not serial' \ {posargs} \ {toxinidir}/tests/integration/test_crossmodel.py \ @@ -84,7 +72,7 @@ envdir = {toxworkdir}/py3 commands = pip install urllib3<2 pip install pylxd - python -m pytest --tb native -ra -v {toxinidir}/tests/unit {posargs} + pytest {toxinidir}/tests/unit {posargs} [testenv:serial] # tests that can't be run in parallel @@ -94,11 +82,11 @@ envdir = {toxworkdir}/py3 commands = pip install urllib3<2 pip install pylxd - python -m pytest --tb native -ra -v -s {posargs:-m 'serial'} + pytest --tb native -s {posargs:-m 'serial'} [testenv:validate] envdir = {toxworkdir}/validate -commands = python -m pytest --tb native -ra -vv tests/validate +commands = pytest -vvv tests/validate [testenv:example] envdir = {toxworkdir}/py3