From 24621959914e08c9d9dff0baffa00daa9b8bddbb Mon Sep 17 00:00:00 2001 From: Ogi Date: Sat, 8 Jun 2019 18:42:37 -0700 Subject: [PATCH] Call pytest directly, ignore specific warnings, fix azure template labeling --- azure-test-template.yml | 13 ++++++------- pytest.ini | 10 +++++++++- tox.ini | 17 +++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/azure-test-template.yml b/azure-test-template.yml index 09ba4757..cfdb98dc 100644 --- a/azure-test-template.yml +++ b/azure-test-template.yml @@ -10,7 +10,7 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - Python27-Qt4: + Python27-PyQt4: python.version: '2.7' qt.bindings: "pyqt=4" install.method: "conda" @@ -19,11 +19,11 @@ jobs: qt.bindings: "pyside" install.method: "conda" Python37-PyQt-5.9: - python.version: "3.7" + python.version: "3.6" qt.bindings: "pyqt" install.method: "conda" - Python37-PySide2-5.6: - python.version: "3.7" + Python37-PySide2-5.9: + python.version: "3.6" qt.bindings: "pyside2" install.method: "conda" Python37-PyQt-5.12: @@ -141,10 +141,9 @@ jobs: mkdir -p "$SCREENSHOT_DIR" # 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" - python -m pytest -sv \ + pytest . -sv \ --junitxml=junit/test-results.xml \ - --cov pyqtgraph --cov-report=xml --cov-report=html \ - --faulthandler-timeout=60 + --cov pyqtgraph --cov-report=xml --cov-report=html displayName: 'Unit tests' env: AZURE: 1 diff --git a/pytest.ini b/pytest.ini index 1f133c35..c2f39a6f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,11 @@ [pytest] - +# use this due to some issues with ndarray reshape errors on CI systems 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 \ No newline at end of file diff --git a/tox.ini b/tox.ini index 5a86b387..6bbb5566 100644 --- a/tox.ini +++ b/tox.ini @@ -2,19 +2,22 @@ envlist = ; qt 5.12.x py{27,37}-pyside2-pip - ; qt 5.12.x py{35,37}-pyqt5-pip + ; qt 5.9.7 py{27,37}-pyqt5-conda + py{27,37}-pyside2-conda + ; qt 5.6.2 py35-pyqt5-conda - ; qt 5.6.2 - py{27,35,37}-pyside2-conda - ; pyqt 4.11.4 / qt 4.8.7 + ; consider dropping support... + ; py35-pyside2-conda + + ; qt 4.8.7 py{27,36}-pyqt4-conda - ; pyside 1.2.4 / qt 4.8.7 py{27,36}-pyside-conda + [base] deps = pytest @@ -26,10 +29,12 @@ deps = coverage [testenv] +passenv = DISPLAY XAUTHORITY deps= {[base]deps} pytest-cov pytest-xdist + pytest-faulthandler pyside2-pip: pyside2 pyqt5-pip: pyqt5 @@ -43,4 +48,4 @@ conda_channels= conda-forge commands= python -c "import pyqtgraph as pg; pg.systemInfo()" - python -m pytest {posargs:pyqtgraph -svv} + pytest {posargs:.}