travis-ci
1466 of 1466 new or added lines in 23 files covered. (100.0%)
1863 of 2048 relevant lines covered (90.97%)
0.91 hits per line
|
def _xargs(iterable, cmd_len=1024): |
1✔ |
|
fn_len = 0
|
1✔ |
|
buf = [] |
1✔ |
|
iterable = list(iterable)
|
1✔ |
|
while iterable:
|
1✔ |
|
s = iterable.pop(0)
|
1✔ |
|
l = len(s) + 1 |
1✔ |
|
if fn_len + l >= cmd_len:
|
1✔ |
|
yield buf
|
× |
|
buf = [] |
× |
|
fn_len = 0
|
× |
|
buf.append(s) |
1✔ |
|
fn_len += l |
1✔ |
|
if buf:
|
1✔ |
|
yield buf
|
1✔ |