Replace dict.iterkeys with six.iterkeys to make PY3 compatible
Python3 do not use dict.iterkeys, which would raise AttributeError: 'dict' object has no attribute 'iterkeys'. Change-Id: I97e320eac9f2f0b2cb5cf34a1d3fc57e80e440ed Closes-Bug: #1596124
This commit is contained in:
parent
4b10efd855
commit
19d8df31fd
3
tools/colorizer.py
Executable file → Normal file
3
tools/colorizer.py
Executable file → Normal file
@ -42,6 +42,7 @@
|
||||
"""Display a subunit stream through a colorized unittest test runner."""
|
||||
|
||||
import heapq
|
||||
import six
|
||||
import subunit
|
||||
import sys
|
||||
import unittest
|
||||
@ -276,7 +277,7 @@ class SubunitTestResult(testtools.TestResult):
|
||||
self.stopTestRun()
|
||||
|
||||
def stopTestRun(self):
|
||||
for cls in list(self.results.iterkeys()):
|
||||
for cls in list(six.iterkeys(self.results)):
|
||||
self.writeTestCase(cls)
|
||||
self.stream.writeln()
|
||||
self.writeSlowTests()
|
||||
|
Loading…
x
Reference in New Issue
Block a user