From 581de1f246356b7299fdf8fcff51abcd49d8bb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fritze?= Date: Thu, 23 Dec 2021 15:41:43 +0100 Subject: [PATCH] adds a test for QtOpenGL --- qtpy/tests/test_qtopengl.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 qtpy/tests/test_qtopengl.py diff --git a/qtpy/tests/test_qtopengl.py b/qtpy/tests/test_qtopengl.py new file mode 100644 index 00000000..502aff0a --- /dev/null +++ b/qtpy/tests/test_qtopengl.py @@ -0,0 +1,21 @@ +import pytest +from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 + +def test_qtopengl(): + """Test the qtpy.QtOpenGL namespace""" + from qtpy import QtOpenGL + + # This list is take from https://doc.qt.io/qtforpython-5/PySide2/QtOpenGL/index.html + # and may not be exhaustive + assert QtOpenGL.QGL is not None + assert QtOpenGL.QGLBuffer is not None + assert QtOpenGL.QGLColormap is not None + assert QtOpenGL.QGLContext is not None + assert QtOpenGL.QGLFormat is not None + assert QtOpenGL.QGLFrameBufferObject is not None + assert QtOpenGL.QGLFrameBufferObjectFormat is not None + assert QtOpenGL.QGLPixelBuffer is not None + assert QtOpenGL.QGLShader is not None + assert QtOpenGL.QGLShaderProgram is not None + assert QtOpenGL.QGLWidget is not None +