add py13 to tox envlist

upd Run tests section in README.
This commit is contained in:
Onyx and Iris 2025-02-13 10:59:20 +00:00
parent b79d9494a2
commit e21a458c6f
4 changed files with 47 additions and 41 deletions

View File

@ -869,10 +869,12 @@ with voicemeeterlib.api('banana') as vm:
### Run tests ### Run tests
To run all tests: Install [poetry](https://python-poetry.org/docs/#installation) and then:
``` ```powershell
pytest -v poetry poe test-basic
poetry poe test-banana
poetry poe test-potato
``` ```
### Official Documentation ### Official Documentation

16
poetry.lock generated
View File

@ -172,14 +172,14 @@ testing = ["covdefaults (>=2.3)", "pytest (>=8.3.3)", "pytest-cov (>=5)", "pytes
[[package]] [[package]]
name = "pytest" name = "pytest"
version = "7.4.4" version = "8.3.4"
description = "pytest: simple powerful testing with Python" description = "pytest: simple powerful testing with Python"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.8"
groups = ["dev"] groups = ["dev"]
files = [ files = [
{file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"},
{file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"},
] ]
[package.dependencies] [package.dependencies]
@ -187,11 +187,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
iniconfig = "*" iniconfig = "*"
packaging = "*" packaging = "*"
pluggy = ">=0.12,<2.0" pluggy = ">=1.5,<2"
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} tomli = {version = ">=1", markers = "python_version < \"3.11\""}
[package.extras] [package.extras]
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
[[package]] [[package]]
name = "pytest-randomly" name = "pytest-randomly"
@ -360,4 +360,4 @@ virtualenv = "*"
[metadata] [metadata]
lock-version = "2.1" lock-version = "2.1"
python-versions = ">=3.10" python-versions = ">=3.10"
content-hash = "9e720abd0018156ac6989a98516ad781f38008a19c6d6008840159281926a354" content-hash = "6339967c3f6cad8e4db7047ef3d12a5b059a279d0f7c98515c961477680bab8f"

View File

@ -19,8 +19,8 @@ packages = [{ include = "voicemeeterlib" }]
poethepoet = "^0.32.1" poethepoet = "^0.32.1"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
pytest = "^7.4.4" pytest = "^8.3.4"
pytest-randomly = "^3.12.0" pytest-randomly = "^3.16.0"
ruff = "^0.8.6" ruff = "^0.8.6"
tox = "^4.23.2" tox = "^4.23.2"
virtualenv-pyenv = "^0.5.0" virtualenv-pyenv = "^0.5.0"
@ -37,39 +37,42 @@ levels.script = "scripts:ex_levels"
midi.script = "scripts:ex_midi" midi.script = "scripts:ex_midi"
obs.script = "scripts:ex_obs" obs.script = "scripts:ex_obs"
observer.script = "scripts:ex_observer" observer.script = "scripts:ex_observer"
test_basic.script = "scripts:test_basic" test-basic.script = "scripts:test_basic"
test_banana.script = "scripts:test_banana" test-banana.script = "scripts:test_banana"
test_potato.script = "scripts:test_potato" test-potato.script = "scripts:test_potato"
test_all.script = "scripts:test_all" test-all.script = "scripts:test_all"
[tool.tox] [tool.tox]
legacy_tox_ini = """ legacy_tox_ini = """
[tox] [tox]
envlist = py310,py311,py312 envlist = py310,py311,py312,py313
[testenv] [testenv]
passenv = * passenv = *
setenv = VIRTUALENV_DISCOVERY=pyenv setenv = VIRTUALENV_DISCOVERY=pyenv
allowlist_externals = poetry allowlist_externals = poetry
commands_pre =
poetry install --no-interaction --no-root
commands = commands =
poetry install -v poetry run pytest tests
poetry run pytest tests/
[testenv:dsl] [testenv:dsl]
setenv = VIRTUALENV_DISCOVERY=pyenv setenv = VIRTUALENV_DISCOVERY=pyenv
allowlist_externals = poetry allowlist_externals = poetry
deps = pyparsing deps = pyparsing
commands_pre =
poetry install --no-interaction --no-root --without dev
commands = commands =
poetry install -v --without dev poetry run python examples/dsl
poetry run python examples/dsl/
[testenv:obs] [testenv:obs]
setenv = VIRTUALENV_DISCOVERY=pyenv setenv = VIRTUALENV_DISCOVERY=pyenv
allowlist_externals = poetry allowlist_externals = poetry
deps = obsws-python deps = obsws-python
commands_pre =
poetry install --no-interaction --no-root --without dev
commands = commands =
poetry install -v --without dev poetry run python examples/obs
poetry run python examples/obs/
""" """
[tool.ruff] [tool.ruff]

View File

@ -51,4 +51,5 @@ def test_potato():
def test_all(): def test_all():
steps = [test_basic, test_banana, test_potato] steps = [test_basic, test_banana, test_potato]
[step() for step in steps] for step in steps:
step()