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>
diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py
index e3bb7b4..ca7ef8e 100644
--- a/test/py/tests/test_fpga.py
+++ b/test/py/tests/test_fpga.py
@@ -175,29 +175,29 @@
     f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'bitstream_load')
 
     for cmd in ['dump', 'load', 'loadb']:
-	# missing dev parameter
-	expected = 'fpga: incorrect parameters passed'
-	output = u_boot_console.run_command('fpga %s %x $filesize' % (cmd, addr))
-	#assert expected in output
-	assert expected_usage in output
+        # missing dev parameter
+        expected = 'fpga: incorrect parameters passed'
+        output = u_boot_console.run_command('fpga %s %x $filesize' % (cmd, addr))
+        #assert expected in output
+        assert expected_usage in output
 
-	# more parameters - 0 at the end
-	expected = 'fpga: more parameters passed'
-	output = u_boot_console.run_command('fpga %s %x %x $filesize 0' % (cmd, dev, addr))
-	#assert expected in output
-	assert expected_usage in output
+        # more parameters - 0 at the end
+        expected = 'fpga: more parameters passed'
+        output = u_boot_console.run_command('fpga %s %x %x $filesize 0' % (cmd, dev, addr))
+        #assert expected in output
+        assert expected_usage in output
 
-	# 0 address
-	expected = 'fpga: zero fpga_data address'
-	output = u_boot_console.run_command('fpga %s %x 0 $filesize' % (cmd, dev))
-	#assert expected in output
-	assert expected_usage in output
+        # 0 address
+        expected = 'fpga: zero fpga_data address'
+        output = u_boot_console.run_command('fpga %s %x 0 $filesize' % (cmd, dev))
+        #assert expected in output
+        assert expected_usage in output
 
-	# 0 filesize
-	expected = 'fpga: zero size'
-	output = u_boot_console.run_command('fpga %s %x %x 0' % (cmd, dev, addr))
-	#assert expected in output
-	assert expected_usage in output
+        # 0 filesize
+        expected = 'fpga: zero size'
+        output = u_boot_console.run_command('fpga %s %x %x 0' % (cmd, dev, addr))
+        #assert expected in output
+        assert expected_usage in output
 
 @pytest.mark.buildconfigspec('cmd_fpga')
 @pytest.mark.buildconfigspec('cmd_echo')