Index: third_party/coverage-3.7.1/coverage/misc.py |
diff --git a/third_party/coverage-3.6/coverage/misc.py b/third_party/coverage-3.7.1/coverage/misc.py |
similarity index 93% |
rename from third_party/coverage-3.6/coverage/misc.py |
rename to third_party/coverage-3.7.1/coverage/misc.py |
index ece8023bd451dd75ed99742c20581b92ce168208..0378173fcc3ddc92d00ca94d88d7ef3fec746a25 100644 |
--- a/third_party/coverage-3.6/coverage/misc.py |
+++ b/third_party/coverage-3.7.1/coverage/misc.py |
@@ -38,6 +38,8 @@ def format_lines(statements, lines): |
i = 0 |
j = 0 |
start = None |
+ statements = sorted(statements) |
+ lines = sorted(lines) |
while i < len(statements) and j < len(lines): |
if statements[i] == lines[j]: |
if start == None: |
@@ -86,7 +88,7 @@ def bool_or_none(b): |
def join_regex(regexes): |
"""Combine a list of regexes into one that matches any of them.""" |
if len(regexes) > 1: |
- return "(" + ")|(".join(regexes) + ")" |
+ return "|".join(["(%s)" % r for r in regexes]) |
elif regexes: |
return regexes[0] |
else: |
@@ -113,8 +115,10 @@ class Hasher(object): |
self.md5.update(to_bytes(str(type(v)))) |
if isinstance(v, string_class): |
self.md5.update(to_bytes(v)) |
+ elif v is None: |
+ pass |
elif isinstance(v, (int, float)): |
- self.update(str(v)) |
+ self.md5.update(to_bytes(str(v))) |
elif isinstance(v, (tuple, list)): |
for e in v: |
self.update(e) |
@@ -146,6 +150,10 @@ class NoSource(CoverageException): |
"""We couldn't find the source for a module.""" |
pass |
+class NoCode(NoSource): |
+ """We couldn't find any code at all.""" |
+ pass |
+ |
class NotPython(CoverageException): |
"""A source file turned out not to be parsable Python.""" |
pass |