diff --git a/examples/test_examples.py b/examples/test_examples.py index 685b71d7..a0be0750 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -10,6 +10,7 @@ import importlib import itertools import pytest import os, sys +import platform import subprocess import time if __name__ == "__main__" and (__package__ is None or __package__==''): @@ -69,75 +70,83 @@ conditionalExamples = { ) ), 'GLVolumeItem.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLIsosurface.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLSurfacePlot.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLScatterPlotItem.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLshaders.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLLinePlotItem.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLMeshItem.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ), 'GLImageItem.py': exceptionCondition( - not(sys.platform == "darwin" and - sys.version_info[0] == 2 and - (frontends[Qt.PYQT4] or frontends[Qt.PYSIDE])), + not(platform.system() == "Darwin" and + tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and + (sys.version_info <= (3, 8, 7) or + (sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))), reason=( - "glClear does not work on macOS + Python2.7 + Qt4: ", - "https://github.com/pyqtgraph/pyqtgraph/issues/939" + "pyopenGL cannot find openGL libray on big sur: " + "https://github.com/python/cpython/pull/21241" ) ) }