Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Oct 28, 2024
1 parent f13250f commit d053bc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tests/test_gui_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ def test_gui_scheduling_ondemand():
assert canvas.draw_count == 2

# Forcing a draw has direct effect
canvas.draw_count = canvas.events_count = 0
canvas.force_draw()
assert canvas.draw_count == 3
assert canvas.draw_count == 1
assert canvas.events_count == 0


def test_gui_scheduling_ondemand_always_request_draw():
Expand Down Expand Up @@ -177,7 +179,7 @@ def _test_gui_scheduling_continuous(canvas):
canvas.draw_count = canvas.events_count = 0
canvas.force_draw()
assert canvas.draw_count == 1
assert canvas.events_count == 1
assert canvas.events_count == 0


def test_gui_scheduling_fastest():
Expand All @@ -203,7 +205,7 @@ def test_gui_scheduling_fastest():
canvas.draw_count = canvas.events_count = 0
canvas.force_draw()
assert canvas.draw_count == 1
assert canvas.events_count == 1
assert canvas.events_count == 0


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion wgpu/gui/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def close(self):

def is_closed(self):
"""Get whether the window is closed."""
raise NotImplementedError()
return False

# === Secondary canvas management methods

Expand Down

0 comments on commit d053bc7

Please sign in to comment.