Skip to content

Commit 6d30b6b

Browse files
committed
Handle resetting the default camera on the context during unit tests
1 parent 71b233b commit 6d30b6b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arcade/context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ def reset(self) -> None:
334334
self.projection_matrix = Mat4.orthogonal_projection(
335335
0, self.window.width, 0, self.window.height, -100, 100
336336
)
337+
self._default_camera: DefaultProjector = DefaultProjector(context=self)
338+
self.current_camera = self._default_camera
337339
self.enable_only(self.BLEND)
338340
self.blend_func = self.BLEND_DEFAULT
339341
self.point_size = 1.0

tests/unit/draw/test_drawing_primitives.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ def test_draw_primitives(window):
66
Render the screen.
77
"""
88
window.background_color = arcade.color.WHITE
9-
window.viewport = (0, 0, window.width, window.height)
109
window.clear()
1110

1211
# Draw a grid

0 commit comments

Comments
 (0)