push
travis-ci
137 of 137 new or added lines in 7 files covered. (100.0%)
579 of 614 relevant lines covered (94.3%)
3.73 hits per line
|
import six |
4✔ |
2 |
|
|
|
def _long(value): |
4✔ |
|
try:
|
4✔ |
|
return long(value) |
4✔ |
|
except NameError: # we're Python 3, we don't have longs |
2 only 23.4 and 23.3 ✔ |
|
return int(value) |
2 only 23.4 and 23.3 ✔ |
8 |
|
|
9 |
|
|
|
def cast_to_bytestring(value): |
4✔ |
|
if not isinstance(value, six.binary_type): |
× |
|
if six.PY2:
|
× |
|
value = str(value)
|
× |
14 |
else:
|
|
|
value = bytes(value)
|
× |
16 |
|
|
|
return value
|
× |