mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
[App] Finally, time mocking in tests seems to be working! 😅
I had to add a flag in the `_timer` module that allows us to completely disable the "skip" feature of Timers, though - but it shouldn't cause too much trouble 🤞
This commit is contained in:
@@ -177,12 +177,12 @@ class MockAnimator(Animator):
|
||||
self._time = 0.0
|
||||
self._on_animation_frame_called = False
|
||||
|
||||
def get_time(self):
|
||||
return self._time
|
||||
|
||||
def on_animation_frame(self):
|
||||
self._on_animation_frame_called = True
|
||||
|
||||
def _get_time(self):
|
||||
return self._time
|
||||
|
||||
|
||||
def test_animator():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user