de-duplicate Big Sur opengl skip testing

This commit is contained in:
Kiu Shueng Chuan 2021-02-26 13:38:12 +08:00 committed by KIU Shueng Chuan
parent 5f6be29f66
commit 1ad7d49908

View File

@ -56,6 +56,13 @@ installedFrontends = sorted([
frontend for frontend, isPresent in frontends.items() if isPresent frontend for frontend, isPresent in frontends.items() if isPresent
]) ])
darwin_opengl_broken = (platform.system() == "Darwin" and
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and
(sys.version_info <= (3, 8, 7) or (3, 9) <= sys.version_info < (3, 9, 1)))
darwin_opengl_reason = ("pyopenGL cannot find openGL library on big sur: "
"https://github.com/python/cpython/pull/21241")
exceptionCondition = namedtuple("exceptionCondition", ["condition", "reason"]) exceptionCondition = namedtuple("exceptionCondition", ["condition", "reason"])
conditionalExamples = { conditionalExamples = {
"test_ExampleApp.py": exceptionCondition( "test_ExampleApp.py": exceptionCondition(
@ -71,104 +78,44 @@ conditionalExamples = {
reason="Test is being problematic on CI machines" reason="Test is being problematic on CI machines"
), ),
'GLVolumeItem.py': exceptionCondition( 'GLVolumeItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLIsosurface.py': exceptionCondition( 'GLIsosurface.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLSurfacePlot.py': exceptionCondition( 'GLSurfacePlot.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLScatterPlotItem.py': exceptionCondition( 'GLScatterPlotItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLshaders.py': exceptionCondition( 'GLshaders.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLLinePlotItem.py': exceptionCondition( 'GLLinePlotItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLMeshItem.py': exceptionCondition( 'GLMeshItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLImageItem.py': exceptionCondition( 'GLImageItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLBarGraphItem.py': exceptionCondition( 'GLBarGraphItem.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
), ),
'GLViewWidget.py': exceptionCondition( 'GLViewWidget.py': exceptionCondition(
not(platform.system() == "Darwin" and not darwin_opengl_broken,
tuple(map(int, platform.mac_ver()[0].split("."))) >= (10, 16) and reason=darwin_opengl_reason
(sys.version_info <= (3, 8, 7) or
(sys.version_info >= (3, 9) and sys.version_info < (3, 9, 1)))),
reason=(
"pyopenGL cannot find openGL libray on big sur: "
"https://github.com/python/cpython/pull/21241"
)
) )
} }