wheatley
wheatley copied to clipboard
Allow ringing sessions to be recorded and played back as test cases
This would provide an excellent mechanism for testing Wheatley's performance, since if we mocked the Tower
class and make the sleep
function just increment a counter then we can simulate Wheatley ringing for huge amounts of time.
If someone else wants to have a crack at this then they're very welcome, but if I had to do it I'd probably do something like:
- Move all the knowledge of timing (i.e.
time.time()
andtime.sleep()
) into theTower
class so that it can be mocked easily. - Make some kind of running mode which records the events passing through the
Tower
class and records them to some format (probably JSON) - Make a mocked version of
Tower
which never interacts with RR but instead replays any given simulation using mockedsleep
andtime
functions to go wayyyy faster than real time.