mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-01 12:34:58 +00:00
16 lines
295 B
Python
16 lines
295 B
Python
|
from wraptor.context import timer
|
||
|
import time
|
||
|
|
||
|
def test_basic():
|
||
|
with timer() as t:
|
||
|
time.sleep(0.1000000) # sleep 100 ms
|
||
|
|
||
|
assert t.interval >= 100
|
||
|
|
||
|
def test_params():
|
||
|
with timer('test') as t:
|
||
|
pass
|
||
|
|
||
|
assert t.name == 'test'
|
||
|
assert str(t).startswith('test')
|