Skip to content

Commit 4898bde

Browse files
leofangclaude
andcommitted
Fix test_graphics_api_smoketest on py3.10/3.11 Windows
On py3.10/3.11, pyglet raises FileNotFoundError (an OSError subclass) when opengl32.dll is missing, rather than AttributeError as on py3.12+. Add OSError to the except clause so the test skips gracefully. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent bd3e990 commit 4898bde

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎cuda_bindings/tests/test_graphics_apis.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_graphics_api_smoketest():
1212
import pyglet
1313

1414
tex = pyglet.image.Texture.create(512, 512)
15-
except (ImportError, AttributeError):
15+
except (ImportError, AttributeError, OSError):
1616
pytest.skip("pyglet not available or could not create GL context")
1717
# return to make linters happy
1818
return

0 commit comments

Comments
 (0)