From fe1193e254faccc4e6629f1cfbc99d5ceb34428a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 24 Oct 2019 11:59:20 -0400 Subject: 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 Reviewed-by: Simon Glass Tested-by: Stephen Warren Tested-by: Simon Glass [on sandbox] Signed-off-by: Tom Rini --- test/py/tests/test_log.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/py/tests/test_log.py') 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 -- cgit v1.2.3