push
travis-ci
129 of 129 new or added lines in 7 files covered. (100.0%)
1797 of 1982 relevant lines covered (90.67%)
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✔ |