summaryrefslogtreecommitdiff
path: root/test/py/tests/test_log.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-10-24 18:59:20 +0300
committerTom Rini <trini@konsulko.com>2019-10-31 00:48:47 +0300
commitfe1193e254faccc4e6629f1cfbc99d5ceb34428a (patch)
tree73c71f3873328c3e194296da9b2554022703a416 /test/py/tests/test_log.py
parent3c941e048c824b94ae09fd9e1f91116f55ce0f1f (diff)
downloadu-boot-fe1193e254faccc4e6629f1cfbc99d5ceb34428a.tar.xz
test/py: Automated conversion to Python 3
Use the 2to3 tool to perform numerous automatic conversions from Python 2 syntax to Python 3. Also fix whitespace problems that Python 3 catches that Python 2 did not. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test/py/tests/test_log.py')
-rw-r--r--test/py/tests/test_log.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py
index cb183444c6..75325fad61 100644
--- a/test/py/tests/test_log.py
+++ b/test/py/tests/test_log.py
@@ -27,9 +27,9 @@ def test_log(u_boot_console):
"""
for i in range(max_level):
if mask & 1:
- assert 'log_run() log %d' % i == lines.next()
+ assert 'log_run() log %d' % i == next(lines)
if mask & 3:
- assert 'func() _log %d' % i == lines.next()
+ assert 'func() _log %d' % i == next(lines)
def run_test(testnum):
"""Run a particular test number (the 'log test' command)
@@ -43,7 +43,7 @@ def test_log(u_boot_console):
output = u_boot_console.run_command('log test %d' % testnum)
split = output.replace('\r', '').splitlines()
lines = iter(split)
- assert 'test %d' % testnum == lines.next()
+ assert 'test %d' % testnum == next(lines)
return lines
def test0():
@@ -88,7 +88,7 @@ def test_log(u_boot_console):
def test10():
lines = run_test(10)
for i in range(7):
- assert 'log_test() level %d' % i == lines.next()
+ assert 'log_test() level %d' % i == next(lines)
# TODO(sjg@chromium.org): Consider structuring this as separate tests
cons = u_boot_console