Closed linuxdaemon closed 5 years ago
In tests certain tests like https://github.com/snoonetIRC/CloudBot/blob/27d99267c66729bc02874a7f90a48cc790c48650/tests/core_tests/util_tests/test_tokenbucket.py#L37-L41 time.sleep() is used to wait for some time-based condition. Tests can be sped up if we replace time.sleep() calls with something that just increments a mocked time.time()
time.sleep()
time.time()
In tests certain tests like https://github.com/snoonetIRC/CloudBot/blob/27d99267c66729bc02874a7f90a48cc790c48650/tests/core_tests/util_tests/test_tokenbucket.py#L37-L41
time.sleep()
is used to wait for some time-based condition. Tests can be sped up if we replacetime.sleep()
calls with something that just increments a mockedtime.time()