arcade
arcade copied to clipboard
Headless integration and unit tests
Enhancement
Current behavior:
GitHub CI does not run tests, while the Windows test runner & Local Linux pytest runs do.
For example, this missing symbol fails on Windows & locally as expected, but does not under the Linux runners.
Expected behavior:
Linux runners fail as expected:
FAILED tests/unit/scene/test_scene_dunder_methods.py::test_contains - NameError: name 'Walls_SpriteList' is not defined
Steps to reproduce/example code:
Use b85a87f5a1a5d1d732 on gran4/improve_scene.
Recap of discord discussion
Root cause
- The Linux CI runners only ran linting & doc build because we had no way to run tests headless before
- The self-hosted windows runner was a temporary solution to allow tests to run with a real GL context
- Adding headless support to pyglet & arcade happened relatively recently
- We still need to finish enabling tests
- We need to document the problem better in the meantime
Possible future work / fixes
- Get headless working for Linux
- (Optional) Build mocks / fixtures to increase unit test purity, like this one added in pyglet
- (Optional) DRYing up our GitHub actions config