mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-30 19:46:25 +00:00
17 lines
251 B
Python
17 lines
251 B
Python
import time
|
|
|
|
from wraptor.context import throttle
|
|
|
|
def test_basic():
|
|
arr = []
|
|
t = throttle(.1)
|
|
|
|
with t:
|
|
arr.append(1)
|
|
with t:
|
|
arr.append(1)
|
|
time.sleep(.2)
|
|
with t:
|
|
arr.append(1)
|
|
|
|
assert arr == [1, 1]
|