Skipping problematic test on py2/qt4/linux

This commit is contained in:
Ognyan Moore 2020-02-21 16:24:33 -08:00 committed by Ogi
parent 07af12d489
commit f0d1c4eda1
3 changed files with 11 additions and 14 deletions

View File

@ -17,6 +17,7 @@ pr:
variables:
OFFICIAL_REPO: 'pyqtgraph/pyqtgraph'
DEFAULT_MERGE_BRANCH: 'develop'
disable.coverage.autogenerate: 'true'
stages:
- stage: "pre_test"

View File

@ -83,39 +83,35 @@ jobs:
fi
displayName: 'Add Conda To $PATH'
condition: eq(variables['install.method'], 'conda' )
continueOnError: false
- bash: |
if [ $(install.method) == "conda" ]
then
conda update --all --yes --quiet
conda create --name test-environment-$(python.version) python=$(python.version) --yes --quiet
source activate test-environment-$(python.version)
conda config --env --set always_yes true
if [ $(python.version) == '2.7' ] && [ $(agent.os) != 'Windows_NT' ]
if [ $(python.version) == '2.7' ]
then
conda config --set restore_free_channel true
fi
if [ $(qt.bindings) == "pyside2" ] || ([ $(qt.bindings) == 'pyside' ] && [ $(agent.os) == 'Darwin' ])
then
conda config --prepend channels conda-forge
fi
conda info
if [ $(python.version) == '2.7' ] && [ $(agent.os) == 'Linux' ]
then
pip install --upgrade pip==19.3.1
conda install setuptools=44.0.0 --yes --quiet
conda install nomkl
fi
conda install $(qt.bindings) numpy scipy pyopengl h5py six --yes --quiet
else
pip install $(qt.bindings) numpy scipy pyopengl h5py six
fi
echo ""
pip install pytest pytest-cov coverage
pip install pytest pytest-cov coverage pytest-xdist
if [ $(python.version) == "2.7" ]
then
pip install pytest-faulthandler==1.6.0
export PYTEST_ADDOPTS="--faulthandler-timeout=15"
else
pip install pytest pytest-cov coverage
fi
displayName: "Install Dependencies"
@ -171,6 +167,7 @@ jobs:
# 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"
pytest . -v \
-n 1 \
--junitxml=junit/test-results.xml \
--cov pyqtgraph --cov-report=xml --cov-report=html
displayName: 'Unit tests'

View File

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
import sys
import numpy as np
import pytest
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtTest
from pyqtgraph.tests import assertImageApproved, mouseMove, mouseDrag, mouseClick, TransposedImageItem, resizeWindow
import pytest
app = pg.mkQApp()
def test_getArrayRegion(transpose=False):
pr = pg.PolyLineROI([[0, 0], [27, 0], [0, 28]], closed=True)
pr.setPos(1, 1)
@ -33,7 +33,6 @@ def test_getArrayRegion(transpose=False):
finally:
pg.setConfigOptions(imageAxisOrder=origMode)
def test_getArrayRegion_axisorder():
test_getArrayRegion(transpose=True)
@ -135,7 +134,7 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
img2.setImage(rgn[0, ..., 0])
app.processEvents()
# on windows, one edge of one ROI handle is shifted slightly; letting this slide with pxCount=10
if sys.platform == 'win32' and pg.Qt.QT_LIB in ('PyQt4', 'PySide'):
if pg.Qt.QT_LIB in {'PyQt4', 'PySide'}:
pxCount = 10
else:
pxCount=-1