From 0afd8adcd818d5dae921c7ad3637474debd1e32e Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 31 Jul 2021 08:23:39 +0800 Subject: [PATCH] add Big Sur conditional examples from utils.py --- examples/GLBarGraphItem.py | 2 +- examples/test_examples.py | 48 +++++--------------------------------- examples/utils.py | 2 +- 3 files changed, 8 insertions(+), 44 deletions(-) diff --git a/examples/GLBarGraphItem.py b/examples/GLBarGraphItem.py index 094354a2..5293a795 100644 --- a/examples/GLBarGraphItem.py +++ b/examples/GLBarGraphItem.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Demonstrate use of GLLinePlotItem to draw cross-sections of a surface. +This example demonstrates the use of GLBarGraphItem. """ ## Add path to library (just for examples; you do not need this) diff --git a/examples/test_examples.py b/examples/test_examples.py index 473a161a..ae5cf8de 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -70,51 +70,15 @@ conditionalExamples = { False, reason="Test is being problematic on CI machines" ), - 'GLVolumeItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLIsosurface.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLSurfacePlot.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLScatterPlotItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLshaders.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLTextItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLLinePlotItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLMeshItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLImageItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLBarGraphItem.py': exceptionCondition( - not darwin_opengl_broken, - reason=darwin_opengl_reason - ), - 'GLViewWidget.py': exceptionCondition( +} + +openglExamples = ['GLViewWidget.py'] +openglExamples.extend(utils.examples_['3D Graphics'].values()) +for key in openglExamples: + conditionalExamples[key] = exceptionCondition( not darwin_opengl_broken, reason=darwin_opengl_reason ) -} @pytest.mark.skipif( Qt.QT_LIB == "PySide2" diff --git a/examples/utils.py b/examples/utils.py index 68f4e20f..911f55c7 100644 --- a/examples/utils.py +++ b/examples/utils.py @@ -74,6 +74,7 @@ examples_ = OrderedDict([ ('Mesh', 'GLMeshItem.py'), ('Image', 'GLImageItem.py'), ('Text', 'GLTextItem.py'), + ('BarGraph', 'GLBarGraphItem.py'), ('Painter', 'GLPainterItem.py'), ])), ('Widgets', OrderedDict([ @@ -106,7 +107,6 @@ others = dict([ ('ScaleBar', 'ScaleBar.py'), ('ViewBox', 'ViewBox.py'), ('GradientEditor', 'GradientEditor.py'), - ('GLBarGraphItem', 'GLBarGraphItem.py'), ('GLViewWidget', 'GLViewWidget.py'), ('DiffTreeWidget', 'DiffTreeWidget.py'), ('MultiPlotWidget', 'MultiPlotWidget.py'),