Call pytest directly, ignore specific warnings, fix azure template labeling

This commit is contained in:
Ogi 2019-06-08 18:42:37 -07:00
parent a838e0267f
commit 2462195991
3 changed files with 26 additions and 14 deletions

View File

@ -10,7 +10,7 @@ jobs:
vmImage: ${{ parameters.vmImage }} vmImage: ${{ parameters.vmImage }}
strategy: strategy:
matrix: matrix:
Python27-Qt4: Python27-PyQt4:
python.version: '2.7' python.version: '2.7'
qt.bindings: "pyqt=4" qt.bindings: "pyqt=4"
install.method: "conda" install.method: "conda"
@ -19,11 +19,11 @@ jobs:
qt.bindings: "pyside" qt.bindings: "pyside"
install.method: "conda" install.method: "conda"
Python37-PyQt-5.9: Python37-PyQt-5.9:
python.version: "3.7" python.version: "3.6"
qt.bindings: "pyqt" qt.bindings: "pyqt"
install.method: "conda" install.method: "conda"
Python37-PySide2-5.6: Python37-PySide2-5.9:
python.version: "3.7" python.version: "3.6"
qt.bindings: "pyside2" qt.bindings: "pyside2"
install.method: "conda" install.method: "conda"
Python37-PyQt-5.12: Python37-PyQt-5.12:
@ -141,10 +141,9 @@ jobs:
mkdir -p "$SCREENSHOT_DIR" mkdir -p "$SCREENSHOT_DIR"
# echo "If Screenshots are generated, they may be downloaded from:" # echo "If Screenshots are generated, they may be downloaded from:"
# echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0" # echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0"
python -m pytest -sv \ pytest . -sv \
--junitxml=junit/test-results.xml \ --junitxml=junit/test-results.xml \
--cov pyqtgraph --cov-report=xml --cov-report=html \ --cov pyqtgraph --cov-report=xml --cov-report=html
--faulthandler-timeout=60
displayName: 'Unit tests' displayName: 'Unit tests'
env: env:
AZURE: 1 AZURE: 1

View File

@ -1,3 +1,11 @@
[pytest] [pytest]
# use this due to some issues with ndarray reshape errors on CI systems
xvfb_colordepth = 24 xvfb_colordepth = 24
addopts = --faulthandler-timeout=15
filterwarnings =
# comfortable skipping these warnings runtime warnings
# https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility
ignore:numpy.ufunc size changed, may indicate binary incompatibility.*:RuntimeWarning
# Warnings generated from PyQt5.9
ignore:*U.*mode is deprecated:DeprecationWarning
ignore:This method will be removed in future versions. Use 'tree.iter\(\)' or 'list\(tree.iter\(\)\)' instead.:PendingDeprecationWarning

17
tox.ini
View File

@ -2,19 +2,22 @@
envlist = envlist =
; qt 5.12.x ; qt 5.12.x
py{27,37}-pyside2-pip py{27,37}-pyside2-pip
; qt 5.12.x
py{35,37}-pyqt5-pip py{35,37}-pyqt5-pip
; qt 5.9.7 ; qt 5.9.7
py{27,37}-pyqt5-conda py{27,37}-pyqt5-conda
py{27,37}-pyside2-conda
; qt 5.6.2 ; qt 5.6.2
py35-pyqt5-conda py35-pyqt5-conda
; qt 5.6.2 ; consider dropping support...
py{27,35,37}-pyside2-conda ; py35-pyside2-conda
; pyqt 4.11.4 / qt 4.8.7
; qt 4.8.7
py{27,36}-pyqt4-conda py{27,36}-pyqt4-conda
; pyside 1.2.4 / qt 4.8.7
py{27,36}-pyside-conda py{27,36}-pyside-conda
[base] [base]
deps = deps =
pytest pytest
@ -26,10 +29,12 @@ deps =
coverage coverage
[testenv] [testenv]
passenv = DISPLAY XAUTHORITY
deps= deps=
{[base]deps} {[base]deps}
pytest-cov pytest-cov
pytest-xdist pytest-xdist
pytest-faulthandler
pyside2-pip: pyside2 pyside2-pip: pyside2
pyqt5-pip: pyqt5 pyqt5-pip: pyqt5
@ -43,4 +48,4 @@ conda_channels=
conda-forge conda-forge
commands= commands=
python -c "import pyqtgraph as pg; pg.systemInfo()" python -c "import pyqtgraph as pg; pg.systemInfo()"
python -m pytest {posargs:pyqtgraph -svv} pytest {posargs:.}