Fix merge conflict
This commit is contained in:
commit
0ad137c5f4
@ -17,6 +17,7 @@ pr:
|
|||||||
variables:
|
variables:
|
||||||
OFFICIAL_REPO: 'pyqtgraph/pyqtgraph'
|
OFFICIAL_REPO: 'pyqtgraph/pyqtgraph'
|
||||||
DEFAULT_MERGE_BRANCH: 'develop'
|
DEFAULT_MERGE_BRANCH: 'develop'
|
||||||
|
disable.coverage.autogenerate: 'true'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: "pre_test"
|
- stage: "pre_test"
|
||||||
|
@ -83,18 +83,19 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
displayName: 'Add Conda To $PATH'
|
displayName: 'Add Conda To $PATH'
|
||||||
condition: eq(variables['install.method'], 'conda' )
|
condition: eq(variables['install.method'], 'conda' )
|
||||||
|
continueOnError: false
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
if [ $(install.method) == "conda" ]
|
if [ $(install.method) == "conda" ]
|
||||||
then
|
then
|
||||||
|
conda update --all --yes --quiet
|
||||||
conda create --name test-environment-$(python.version) python=$(python.version) --yes --quiet
|
conda create --name test-environment-$(python.version) python=$(python.version) --yes --quiet
|
||||||
source activate test-environment-$(python.version)
|
source activate test-environment-$(python.version)
|
||||||
conda config --env --set always_yes true
|
conda config --env --set always_yes true
|
||||||
if [ $(python.version) == '2.7' ] && [ $(agent.os) != 'Windows_NT' ]
|
if [ $(python.version) == '2.7' ]
|
||||||
then
|
then
|
||||||
conda config --set restore_free_channel true
|
conda config --set restore_free_channel true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(qt.bindings) == "pyside2" ] || ([ $(qt.bindings) == 'pyside' ] && [ $(agent.os) == 'Darwin' ])
|
if [ $(qt.bindings) == "pyside2" ] || ([ $(qt.bindings) == 'pyside' ] && [ $(agent.os) == 'Darwin' ])
|
||||||
then
|
then
|
||||||
conda config --prepend channels conda-forge
|
conda config --prepend channels conda-forge
|
||||||
@ -104,12 +105,13 @@ jobs:
|
|||||||
else
|
else
|
||||||
pip install $(qt.bindings) numpy scipy pyopengl h5py six
|
pip install $(qt.bindings) numpy scipy pyopengl h5py six
|
||||||
fi
|
fi
|
||||||
echo ""
|
pip install pytest pytest-cov coverage pytest-xdist
|
||||||
pip install pytest pytest-cov coverage
|
|
||||||
if [ $(python.version) == "2.7" ]
|
if [ $(python.version) == "2.7" ]
|
||||||
then
|
then
|
||||||
pip install pytest-faulthandler==1.6.0
|
pip install pytest-faulthandler==1.6.0
|
||||||
export PYTEST_ADDOPTS="--faulthandler-timeout=15"
|
export PYTEST_ADDOPTS="--faulthandler-timeout=15"
|
||||||
|
else
|
||||||
|
pip install pytest pytest-cov coverage
|
||||||
fi
|
fi
|
||||||
displayName: "Install Dependencies"
|
displayName: "Install Dependencies"
|
||||||
|
|
||||||
@ -165,6 +167,7 @@ jobs:
|
|||||||
# 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"
|
||||||
pytest . -v \
|
pytest . -v \
|
||||||
|
-n 1 \
|
||||||
--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
|
||||||
displayName: 'Unit tests'
|
displayName: 'Unit tests'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import print_function, division, absolute_import
|
from __future__ import print_function, division, absolute_import
|
||||||
from pyqtgraph import Qt
|
|
||||||
from . import utils
|
from . import utils
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
from pyqtgraph import Qt
|
||||||
import errno
|
import errno
|
||||||
import importlib
|
import importlib
|
||||||
import itertools
|
import itertools
|
||||||
@ -150,6 +150,7 @@ conditionalExamples = {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@pytest.mark.skipif(Qt.QT_LIB == "PySide2" and "Qt.QtVersion.startswith('5.14')", reason="new PySide2 doesn't have loadUi functionality")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"frontend, f",
|
"frontend, f",
|
||||||
[
|
[
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
import sys
|
import sys
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pytest
|
import pytest
|
||||||
@ -5,14 +6,9 @@ import pyqtgraph as pg
|
|||||||
from pyqtgraph.Qt import QtCore, QtTest
|
from pyqtgraph.Qt import QtCore, QtTest
|
||||||
from pyqtgraph.tests import assertImageApproved, mouseMove, mouseDrag, mouseClick, TransposedImageItem, resizeWindow
|
from pyqtgraph.tests import assertImageApproved, mouseMove, mouseDrag, mouseClick, TransposedImageItem, resizeWindow
|
||||||
import pytest
|
import pytest
|
||||||
import platform
|
|
||||||
import six
|
|
||||||
|
|
||||||
app = pg.mkQApp()
|
app = pg.mkQApp()
|
||||||
|
|
||||||
reason = ("Test fails intermittently, will be deprecating py2/qt4 support soon anyway")
|
|
||||||
|
|
||||||
@pytest.mark.skipif(six.PY2 and pg.Qt.QT_LIB in {"PySide", "PyQt4"} and platform.system() == "Linux", reason=reason)
|
|
||||||
def test_getArrayRegion(transpose=False):
|
def test_getArrayRegion(transpose=False):
|
||||||
pr = pg.PolyLineROI([[0, 0], [27, 0], [0, 28]], closed=True)
|
pr = pg.PolyLineROI([[0, 0], [27, 0], [0, 28]], closed=True)
|
||||||
pr.setPos(1, 1)
|
pr.setPos(1, 1)
|
||||||
@ -37,7 +33,6 @@ def test_getArrayRegion(transpose=False):
|
|||||||
finally:
|
finally:
|
||||||
pg.setConfigOptions(imageAxisOrder=origMode)
|
pg.setConfigOptions(imageAxisOrder=origMode)
|
||||||
|
|
||||||
@pytest.mark.skipif(six.PY2 and pg.Qt.QT_LIB in {"PySide", "PyQt4"} and platform.system() == "Linux", reason=reason)
|
|
||||||
def test_getArrayRegion_axisorder():
|
def test_getArrayRegion_axisorder():
|
||||||
test_getArrayRegion(transpose=True)
|
test_getArrayRegion(transpose=True)
|
||||||
|
|
||||||
@ -139,7 +134,7 @@ def check_getArrayRegion(roi, name, testResize=True, transpose=False):
|
|||||||
img2.setImage(rgn[0, ..., 0])
|
img2.setImage(rgn[0, ..., 0])
|
||||||
app.processEvents()
|
app.processEvents()
|
||||||
# on windows, one edge of one ROI handle is shifted slightly; letting this slide with pxCount=10
|
# 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
|
pxCount = 10
|
||||||
else:
|
else:
|
||||||
pxCount=-1
|
pxCount=-1
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
import gc, os
|
import gc, os
|
||||||
import pytest
|
import pytest
|
||||||
@ -14,6 +15,7 @@ def test_isQObjectAlive():
|
|||||||
|
|
||||||
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason='pysideuic does not appear to be '
|
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason='pysideuic does not appear to be '
|
||||||
'packaged with conda')
|
'packaged with conda')
|
||||||
|
@pytest.mark.skipif(pg.Qt.QT_LIB == "PySide2" and "pg.Qt.QtVersion.startswith('5.14')", reason="new PySide2 doesn't have loadUi functionality")
|
||||||
def test_loadUiType():
|
def test_loadUiType():
|
||||||
path = os.path.dirname(__file__)
|
path = os.path.dirname(__file__)
|
||||||
formClass, baseClass = pg.Qt.loadUiType(os.path.join(path, 'uictest.ui'))
|
formClass, baseClass = pg.Qt.loadUiType(os.path.join(path, 'uictest.ui'))
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
Test for unwanted reference cycles
|
Test for unwanted reference cycles
|
||||||
|
|
||||||
@ -9,9 +10,7 @@ import six
|
|||||||
import pytest
|
import pytest
|
||||||
app = pg.mkQApp()
|
app = pg.mkQApp()
|
||||||
|
|
||||||
skipreason = ('unclear why test is failing on python 3. skipping until someone '
|
skipreason = ('This test is failing on pyside for an unknown reason.')
|
||||||
'has time to fix it. Or pyside is being used. This test is '
|
|
||||||
'failing on pyside for an unknown reason too.')
|
|
||||||
|
|
||||||
def assert_alldead(refs):
|
def assert_alldead(refs):
|
||||||
for ref in refs:
|
for ref in refs:
|
||||||
@ -37,10 +36,10 @@ def mkrefs(*objs):
|
|||||||
for o in obj:
|
for o in obj:
|
||||||
allObjs[id(o)] = o
|
allObjs[id(o)] = o
|
||||||
|
|
||||||
return map(weakref.ref, allObjs.values())
|
return list(map(weakref.ref, allObjs.values()))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(six.PY3 or pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
||||||
def test_PlotWidget():
|
def test_PlotWidget():
|
||||||
def mkobjs(*args, **kwds):
|
def mkobjs(*args, **kwds):
|
||||||
w = pg.PlotWidget(*args, **kwds)
|
w = pg.PlotWidget(*args, **kwds)
|
||||||
@ -58,7 +57,7 @@ def test_PlotWidget():
|
|||||||
for i in range(5):
|
for i in range(5):
|
||||||
assert_alldead(mkobjs())
|
assert_alldead(mkobjs())
|
||||||
|
|
||||||
@pytest.mark.skipif(six.PY3 or pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
||||||
def test_ImageView():
|
def test_ImageView():
|
||||||
def mkobjs():
|
def mkobjs():
|
||||||
iv = pg.ImageView()
|
iv = pg.ImageView()
|
||||||
@ -71,7 +70,7 @@ def test_ImageView():
|
|||||||
assert_alldead(mkobjs())
|
assert_alldead(mkobjs())
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(six.PY3 or pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason=skipreason)
|
||||||
def test_GraphicsWindow():
|
def test_GraphicsWindow():
|
||||||
def mkobjs():
|
def mkobjs():
|
||||||
w = pg.GraphicsWindow()
|
w = pg.GraphicsWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user