diff --git a/lower-constraints.txt b/lower-constraints.txt
index e55bc0625..e783e2cf5 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -16,9 +16,9 @@ packaging==20.4
paramiko==2.9.2
pbr==5.5.1
psutil==5.8.0
-pytest===6.2.5
-pytest-html==3.1.1
-pytest-xdist==2.2.0
+pytest===7.2.0
+pytest-html==4.1.1
+pytest-xdist==3.5.0
python-dateutil==2.8.0
python-designateclient==4.4.0
python-glanceclient==3.2.2
diff --git a/roles/tobiko-ensure-tox/defaults/main.yaml b/roles/tobiko-ensure-tox/defaults/main.yaml
index c27845ddf..7dba2ba4c 100644
--- a/roles/tobiko-ensure-tox/defaults/main.yaml
+++ b/roles/tobiko-ensure-tox/defaults/main.yaml
@@ -1,5 +1,5 @@
---
tox_command: tox
-tox_min_version: 3.8
-tox_max_version: 4.0
+tox_min_version: 4.13
+tox_max_version: null
diff --git a/roles/tobiko-ensure-tox/tasks/tox.yaml b/roles/tobiko-ensure-tox/tasks/tox.yaml
index 527c2795a..8a079da11 100644
--- a/roles/tobiko-ensure-tox/tasks/tox.yaml
+++ b/roles/tobiko-ensure-tox/tasks/tox.yaml
@@ -2,7 +2,8 @@
- name: "ensure Tox is installed"
command: >
- {{ python_executable }} -m pip install --user 'tox>={{ tox_min_version }},<{{tox_max_version}}'
+ {{ python_executable }} -m pip install --user
+ 'tox>={{ tox_min_version }}{% if tox_max_version is not none %},<={{ tox_max_version }}{% endif %}'
register: install_tox
changed_when: "'Successfully installed' in install_tox.stdout"
diff --git a/test-requirements.txt b/test-requirements.txt
index 5eb801b74..8da3dbaa5 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,6 +1,6 @@
# Test cases requirements
mock>=3.0.5 # BSD
-pytest>=6.2.5 # MIT
-pytest-html>=3.1.1 # MPL-2.0
-pytest-xdist[psutil]>=2.2.0 # MIT
+pytest>=7.2.0 # MIT
+pytest-html>=4.1.1 # MIT
+pytest-xdist[psutil]>=3.5.0 # MIT
diff --git a/tobiko/tests/conftest.py b/tobiko/tests/conftest.py
index e2f031e7b..798712568 100644
--- a/tobiko/tests/conftest.py
+++ b/tobiko/tests/conftest.py
@@ -20,8 +20,8 @@ import re
import subprocess
from oslo_log import log
-from py.xml import html # pylint: disable=no-name-in-module,import-error
import pytest
+from pytest_metadata.plugin import metadata_key
import tobiko
@@ -42,17 +42,18 @@ def pytest_configure(config):
def configure_metadata(config):
+ metadata = config.stash[metadata_key]
# pylint: disable=protected-access
from tobiko import version
- config._metadata["Tobiko Version"] = version.release
+ metadata["Tobiko Version"] = version.release
git_commit = subprocess.check_output(
['git', 'log', '-n', '1'],
universal_newlines=True).replace('\n', '
')
- config._metadata["Tobiko Git Commit"] = git_commit
+ metadata["Tobiko Git Commit"] = git_commit
git_release = subprocess.check_output(
['git', 'describe', '--tags'],
universal_newlines=True).replace('\n', '
')
- config._metadata["Tobiko Git Release"] = git_release
+ metadata["Tobiko Git Release"] = git_release
def configure_caplog(config):
@@ -140,14 +141,15 @@ def configure_timeout(config):
def pytest_html_results_table_header(cells):
- cells.insert(2, html.th("Description"))
- cells.insert(1, html.th("Time", class_="sortable time", col="time"))
+ cells.insert(2, '