travis-ci
22 of 22 new or added lines in 2 files covered. (100.0%)
552 of 574 relevant lines covered (96.17%)
4.46 hits per line
|
import functools |
1 only 410.6 ✔ |
2 |
|
|
|
import asyncio |
1 only 410.6 ✔ |
4 |
|
|
5 |
|
|
|
def wrap_coroutine(api, coroutine): |
1 only 410.6 ✔ |
|
@functools.wraps(coroutine)
|
1 only 410.6 ✔ |
|
@asyncio.coroutine
|
1 only 410.6 ✔ |
9 |
def wrapper(*args, **kwargs): |
|
|
with api as time_factory: |
1 only 410.6 ✔ |
|
if api.as_arg:
|
1 only 410.6 ✔ |
|
result = yield from coroutine(time_factory, *args, **kwargs) |
× |
13 |
else:
|
|
|
result = yield from coroutine(*args, **kwargs) |
1 only 410.6 ✔ |
|
return result
|
1 only 410.6 ✔ |
16 |
|
|
|
return wrapper
|
1 only 410.6 ✔ |