summaryrefslogtreecommitdiff
path: root/tests/coverage.py
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-30 23:25:44 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-30 23:25:44 +0900
commit2d1549b35a4adea66aebd0b7d9266731dd7ece6f (patch)
tree7f82f3e5a85f1946276416a44272b6860c355d4a /tests/coverage.py
parent6ae3b68859562f07a1a7e215a7b55dce800305a9 (diff)
downloadsphinx-git-2d1549b35a4adea66aebd0b7d9266731dd7ece6f.tar.gz
wrap py3 iterators with list() for each places that expect a list object. refs #1350.
Diffstat (limited to 'tests/coverage.py')
-rwxr-xr-xtests/coverage.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/coverage.py b/tests/coverage.py
index fa65a7158..2c2ffff17 100755
--- a/tests/coverage.py
+++ b/tests/coverage.py
@@ -350,7 +350,7 @@ class coverage:
'-o:': 'omit=',
}
short_opts = string.join(map(lambda o: o[1:], optmap.keys()), '')
- long_opts = optmap.values()
+ long_opts = list(optmap.values())
options, args = getopt.getopt(argv, short_opts, long_opts)
for o, a in options:
if o in optmap:
@@ -401,7 +401,7 @@ class coverage:
if settings.get('collect'):
self.collect()
if not args:
- args = self.cexecuted.keys()
+ args = list(self.cexecuted.keys())
ignore_errors = settings.get('ignore-errors')
show_missing = settings.get('show-missing')
@@ -743,9 +743,9 @@ class coverage:
visitor = StatementFindingAstVisitor(statements, excluded, suite_spots)
compiler.walk(ast, visitor, walker=visitor)
- lines = statements.keys()
+ lines = list(statements.keys())
lines.sort()
- excluded_lines = excluded.keys()
+ excluded_lines = list(excluded.keys())
excluded_lines.sort()
return lines, excluded_lines, suite_spots
@@ -850,7 +850,7 @@ class coverage:
morfs = self.filter_by_prefix(morfs, omit_prefixes)
morfs.sort(self.morf_name_compare)
- max_name = max([5,] + map(len, map(self.morf_name, morfs)))
+ max_name = max([5,] + list(map(len, map(self.morf_name, morfs))))
fmt_name = "%%- %ds " % max_name
fmt_err = fmt_name + "%s: %s"
header = fmt_name % "Name" + " Stmts Exec Cover"