aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-09 11:23:48 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-12 09:07:04 +0100
commit86bea038625367f5e4f0898c3312ecb7ded1ada4 (patch)
treecf8ca4da1b3f3ff193e153b082d3214a1ebdfa08 /sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
parent3496f7bc309a139a01d0a423a2bf7157dfd9478e (diff)
tests: handle unused imports and fix type issues
Many modules were imported but unused in our tests. Additionally, some type hint issues were solved. Pick-to: 6.8 Change-Id: Ic2368690e9a6ce0fffea812206185aa4f3dc3c58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py')
-rw-r--r--sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py b/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
index a1433ca4c..e73ae46c1 100644
--- a/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
+++ b/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
@@ -4,7 +4,6 @@ from __future__ import annotations
'''Unit tests for QOpenGLBuffer'''
-import ctypes
import os
import sys
import unittest
@@ -15,7 +14,7 @@ from init_paths import init_test_paths
init_test_paths(False)
from helper.usesqapplication import UsesQApplication
-from PySide6.QtGui import QOffscreenSurface, QOpenGLContext, QSurface, QWindow
+from PySide6.QtGui import QOffscreenSurface, QOpenGLContext, QSurface, QWindow, QSurfaceFormat
from PySide6.QtOpenGL import QOpenGLBuffer
@@ -32,15 +31,15 @@ def createSurface(surfaceClass):
# 888 for WINDOW_BIT, we may end up with a pbuffer surface that is
# incompatible with the context since it could choose the 565 while the
# window and the context uses a config with 888.
- format = QSurfaceFormat
- if format.redBufferSize() == -1:
+ _format = QSurfaceFormat
+ if _format.redBufferSize() == -1:
window = QWindow()
window.setSurfaceType(QWindow.OpenGLSurface)
window.setGeometry(0, 0, 10, 10)
window.create()
- format = window.format()
+ _format = window.format()
offscreenSurface = QOffscreenSurface()
- offscreenSurface.setFormat(format)
+ offscreenSurface.setFormat(_format)
offscreenSurface.create()
return offscreenSurface
return 0