Skip to content

Commit

Permalink
Add pytest header with Qt versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Jun 13, 2024
1 parent 7821fb8 commit edcc3f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@

import os

import qtpy

import qwt
from qwt.tests.utils import TestEnvironment

# Set the unattended environment variable to 1 to avoid any user interaction
os.environ[TestEnvironment.UNATTENDED_ENV] = "1"


def pytest_report_header(config):
"""Add additional information to the pytest report header."""
qtbindings_version = qtpy.PYSIDE_VERSION
if qtbindings_version is None:
qtbindings_version = qtpy.PYQT_VERSION
return [
f"PythonQwt {qwt.__version__} [closest Qwt version: {qwt.QWT_VERSION_STR}]",
f"{qtpy.API_NAME} {qtbindings_version} [Qt version: {qtpy.QT_VERSION}]",
]

0 comments on commit edcc3f9

Please sign in to comment.