From: Zack Cerza Date: Thu, 10 Apr 2025 19:22:07 +0000 (-0600) Subject: tox: Use tox-uv X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2db1fa55653f872a981f2a2b04dc9638142ef72;p=teuthology.git tox: Use tox-uv Signed-off-by: Zack Cerza --- diff --git a/pyproject.toml b/pyproject.toml index 7ca0fccbd..0032ea8d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,6 +83,7 @@ test = [ "pytest-cov", "toml", "tox", + "tox-uv", "xmltodict", ] openstack = [ diff --git a/tox.ini b/tox.ini index 40c48b071..b6722e16d 100644 --- a/tox.ini +++ b/tox.ini @@ -4,41 +4,28 @@ isolated_build = True [testenv] setenv = - LC_ALL=en_US.UTF-8 - LANG=en_US + LC_ALL = en_US.UTF-8 + LANG = en_US [testenv:py3] -install_command = pip install --upgrade {opts} {packages} passenv = HOME -deps= - -r{toxinidir}/requirements.txt - pytest-cov - coverage - mock extras = test log_format = %(asctime)s %(levelname)s %(message)s -commands= +commands = python -m pytest --cov=teuthology --cov-report=term -v {posargs:teuthology scripts} [testenv:flake8] -install_command = pip install --upgrade {opts} {packages} -deps= - flake8 -commands=flake8 --select=F,E9 {posargs:teuthology scripts} +deps = flake8 +commands = flake8 --select=F,E9 {posargs:teuthology scripts} [testenv:docs] -install_command = pip install --upgrade {opts} {packages} -changedir=docs -deps= - -r{toxinidir}/requirements.txt - sphinx != 7.2.0, != 7.2.1, != 7.2.2 - sphinxcontrib-programoutput -commands= +changedir = docs +extras = docs +commands = sphinx-apidoc -f -o . ../teuthology ../teuthology/test ../teuthology/orchestra/test ../teuthology/task/test sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:openstack] -install_command = pip install --upgrade {opts} {packages} passenv = HOME OS_REGION_NAME @@ -47,10 +34,8 @@ passenv = OS_TENANT_NAME OS_PASSWORD OS_USERNAME -deps= - -r{toxinidir}/requirements.txt extras = test -commands=py.test -v {posargs:teuthology/openstack/test/test_openstack.py} +commands = py.test -v {posargs:teuthology/openstack/test/test_openstack.py} [testenv:openstack-integration] passenv = @@ -61,10 +46,10 @@ passenv = OS_TENANT_NAME OS_PASSWORD OS_USERNAME -deps= - -r{toxinidir}/requirements.txt -extras = test -commands= +extras = + test + openstack +commands = py.test -v {posargs} teuthology/openstack/test/openstack-integration.py [testenv:openstack-delegate] @@ -76,7 +61,5 @@ passenv = OS_TENANT_NAME OS_PASSWORD OS_USERNAME -sitepackages=True -deps= - -r{toxinidir}/requirements.txt -commands={toxinidir}/openstack-delegate.sh +sitepackages = True +commands = {toxinidir}/openstack-delegate.sh