Skip to content

Commit 6b9c8dc

Browse files
committed
Update conftest.py to include additional information in pytest report header
1 parent b524015 commit 6b9c8dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

conftest.py

+15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
# content of conftest.py
22

3+
import guidata
4+
import qtpy
35
from guidata.env import execenv
46

7+
import plotpy
8+
59
# Turn on unattended mode for executing tests without user interaction
610
execenv.unattended = True
711
execenv.verbose = "quiet"
12+
13+
14+
def pytest_report_header(config):
15+
"""Add additional information to the pytest report header."""
16+
qtbindings_version = qtpy.PYSIDE_VERSION
17+
if qtbindings_version is None:
18+
qtbindings_version = qtpy.PYQT_VERSION
19+
return [
20+
f"PlotPy {plotpy.__version__}, guidata {guidata.__version__}, "
21+
f"{qtpy.API_NAME} {qtbindings_version} [Qt version: {qtpy.QT_VERSION}]",
22+
]

0 commit comments

Comments
 (0)