test: Use single quote consistently
Some tests have ended up using double quotes where single quotes could be
used. Adjust this for consistency with the rest of U-Boot's Python code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff --git a/test/py/tests/test_avb.py b/test/py/tests/test_avb.py
index 9683fd8..e70a010 100644
--- a/test/py/tests/test_avb.py
+++ b/test/py/tests/test_avb.py
@@ -51,22 +51,22 @@
part_lines = u_boot_console.run_command('mmc part').splitlines()
part_list = {}
- cur_partname = ""
+ cur_partname = ''
for line in part_lines:
- if "\"" in line:
- start_pt = line.find("\"")
- end_pt = line.find("\"", start_pt + 1)
+ if '"' in line:
+ start_pt = line.find('"')
+ end_pt = line.find('"', start_pt + 1)
cur_partname = line[start_pt + 1: end_pt]
- if "guid:" in line:
- guid_to_check = line.split("guid:\t")
+ if 'guid:' in line:
+ guid_to_check = line.split('guid:\t')
part_list[cur_partname] = guid_to_check[1]
# lets check all guids with avb get_guid
for part, guid in part_list.iteritems():
avb_guid_resp = u_boot_console.run_command('avb get_uuid %s' % part)
- assert guid == avb_guid_resp.split("UUID: ")[1]
+ assert guid == avb_guid_resp.split('UUID: ')[1]
@pytest.mark.buildconfigspec('cmd_avb')
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index dee3fee..6e1feb8 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -25,82 +25,82 @@
def test_bind_unbind_with_node(u_boot_console):
#bind /bind-test. Device should come up as well as its children
- response = u_boot_console.run_command("bind /bind-test generic_simple_bus")
+ response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert in_tree(tree, "bind-test-child1", "phy", "phy_sandbox", 1, False)
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
#Unbind child #1. No error expected and all devices should be there except for bind-test-child1
- response = u_boot_console.run_command("unbind /bind-test/bind-test-child1")
+ response = u_boot_console.run_command('unbind /bind-test/bind-test-child1')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert "bind-test-child1" not in tree
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert 'bind-test-child1' not in tree
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
#bind child #1. No error expected and all devices should be there
- response = u_boot_console.run_command("bind /bind-test/bind-test-child1 phy_sandbox")
+ response = u_boot_console.run_command('bind /bind-test/bind-test-child1 phy_sandbox')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert in_tree(tree, "bind-test-child1", "phy", "phy_sandbox", 1, True)
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, False)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, False)
#Unbind child #2. No error expected and all devices should be there except for bind-test-child2
- response = u_boot_console.run_command("unbind /bind-test/bind-test-child2")
+ response = u_boot_console.run_command('unbind /bind-test/bind-test-child2')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert in_tree(tree, "bind-test-child1", "phy", "phy_sandbox", 1, True)
- assert "bind-test-child2" not in tree
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True)
+ assert 'bind-test-child2' not in tree
#Bind child #2. No error expected and all devices should be there
- response = u_boot_console.run_command("bind /bind-test/bind-test-child2 generic_simple_bus")
+ response = u_boot_console.run_command('bind /bind-test/bind-test-child2 generic_simple_bus')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert in_tree(tree, "bind-test-child1", "phy", "phy_sandbox", 1, False)
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
#Unbind parent. No error expected. All devices should be removed and unbound
- response = u_boot_console.run_command("unbind /bind-test")
+ response = u_boot_console.run_command('unbind /bind-test')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert "bind-test" not in tree
- assert "bind-test-child1" not in tree
- assert "bind-test-child2" not in tree
+ tree = u_boot_console.run_command('dm tree')
+ assert 'bind-test' not in tree
+ assert 'bind-test-child1' not in tree
+ assert 'bind-test-child2' not in tree
#try binding invalid node with valid driver
- response = u_boot_console.run_command("bind /not-a-valid-node generic_simple_bus")
+ response = u_boot_console.run_command('bind /not-a-valid-node generic_simple_bus')
assert response != ''
- tree = u_boot_console.run_command("dm tree")
- assert "not-a-valid-node" not in tree
+ tree = u_boot_console.run_command('dm tree')
+ assert 'not-a-valid-node' not in tree
#try binding valid node with invalid driver
- response = u_boot_console.run_command("bind /bind-test not_a_driver")
+ response = u_boot_console.run_command('bind /bind-test not_a_driver')
assert response != ''
- tree = u_boot_console.run_command("dm tree")
- assert "bind-test" not in tree
+ tree = u_boot_console.run_command('dm tree')
+ assert 'bind-test' not in tree
#bind /bind-test. Device should come up as well as its children
- response = u_boot_console.run_command("bind /bind-test generic_simple_bus")
+ response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test", "simple_bus", "generic_simple_bus", 0, True)
- assert in_tree(tree, "bind-test-child1", "phy", "phy_sandbox", 1, False)
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
- response = u_boot_console.run_command("unbind /bind-test")
+ response = u_boot_console.run_command('unbind /bind-test')
assert response == ''
def get_next_line(tree, name):
treelines = [x.strip() for x in tree.splitlines() if x.strip()]
- child_line = ""
+ child_line = ''
for idx, line in enumerate(treelines):
- if ("-- " + name) in line:
+ if ('-- ' + name) in line:
try:
child_line = treelines[idx+1]
except:
@@ -111,68 +111,68 @@
@pytest.mark.buildconfigspec('cmd_bind')
def test_bind_unbind_with_uclass(u_boot_console):
#bind /bind-test
- response = u_boot_console.run_command("bind /bind-test generic_simple_bus")
+ response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
assert response == ''
#make sure bind-test-child2 is there and get its uclass/index pair
- tree = u_boot_console.run_command("dm tree")
- child2_line = [x.strip() for x in tree.splitlines() if "-- bind-test-child2" in x]
+ tree = u_boot_console.run_command('dm tree')
+ child2_line = [x.strip() for x in tree.splitlines() if '-- bind-test-child2' in x]
assert len(child2_line) == 1
child2_uclass = child2_line[0].split()[0]
child2_index = int(child2_line[0].split()[1])
#bind generic_simple_bus as a child of bind-test-child2
- response = u_boot_console.run_command("bind {} {} generic_simple_bus".format(child2_uclass, child2_index, "generic_simple_bus"))
+ response = u_boot_console.run_command('bind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
#check that the child is there and its uclass/index pair is right
- tree = u_boot_console.run_command("dm tree")
+ tree = u_boot_console.run_command('dm tree')
- child_of_child2_line = get_next_line(tree, "bind-test-child2")
+ child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line
child_of_child2_index = int(child_of_child2_line.split()[1])
- assert in_tree(tree, "generic_simple_bus", "simple_bus", "generic_simple_bus", 2, True)
+ assert in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
assert child_of_child2_index == child2_index + 1
#unbind the child and check it has been removed
- response = u_boot_console.run_command("unbind simple_bus {}".format(child_of_child2_index))
+ response = u_boot_console.run_command('unbind simple_bus {}'.format(child_of_child2_index))
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
- assert not in_tree(tree, "generic_simple_bus", "simple_bus", "generic_simple_bus", 2, True)
- child_of_child2_line = get_next_line(tree, "bind-test-child2")
- assert child_of_child2_line == ""
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert not in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
+ child_of_child2_line = get_next_line(tree, 'bind-test-child2')
+ assert child_of_child2_line == ''
#bind generic_simple_bus as a child of bind-test-child2
- response = u_boot_console.run_command("bind {} {} generic_simple_bus".format(child2_uclass, child2_index, "generic_simple_bus"))
+ response = u_boot_console.run_command('bind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
#check that the child is there and its uclass/index pair is right
- tree = u_boot_console.run_command("dm tree")
+ tree = u_boot_console.run_command('dm tree')
treelines = [x.strip() for x in tree.splitlines() if x.strip()]
- child_of_child2_line = get_next_line(tree, "bind-test-child2")
+ child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line
child_of_child2_index = int(child_of_child2_line.split()[1])
- assert in_tree(tree, "generic_simple_bus", "simple_bus", "generic_simple_bus", 2, True)
+ assert in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
assert child_of_child2_index == child2_index + 1
#unbind the child and check it has been removed
- response = u_boot_console.run_command("unbind {} {} generic_simple_bus".format(child2_uclass, child2_index, "generic_simple_bus"))
+ response = u_boot_console.run_command('unbind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
assert response == ''
- tree = u_boot_console.run_command("dm tree")
- assert in_tree(tree, "bind-test-child2", "simple_bus", "generic_simple_bus", 1, True)
+ tree = u_boot_console.run_command('dm tree')
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
- child_of_child2_line = get_next_line(tree, "bind-test-child2")
- assert child_of_child2_line == ""
+ child_of_child2_line = get_next_line(tree, 'bind-test-child2')
+ assert child_of_child2_line == ''
#unbind the child again and check it doesn't change the tree
- tree_old = u_boot_console.run_command("dm tree")
- response = u_boot_console.run_command("unbind {} {} generic_simple_bus".format(child2_uclass, child2_index, "generic_simple_bus"))
- tree_new = u_boot_console.run_command("dm tree")
+ tree_old = u_boot_console.run_command('dm tree')
+ response = u_boot_console.run_command('unbind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
+ tree_new = u_boot_console.run_command('dm tree')
assert response == ''
assert tree_old == tree_new
- response = u_boot_console.run_command("unbind /bind-test")
+ response = u_boot_console.run_command('unbind /bind-test')
assert response == ''
diff --git a/test/py/tests/test_dfu.py b/test/py/tests/test_dfu.py
index a246003..5d87eb3 100644
--- a/test/py/tests/test_dfu.py
+++ b/test/py/tests/test_dfu.py
@@ -20,28 +20,28 @@
env__usb_dev_ports = (
{
- "fixture_id": "micro_b",
- "tgt_usb_ctlr": "0",
- "host_usb_dev_node": "/dev/usbdev-p2371-2180",
+ 'fixture_id': 'micro_b',
+ 'tgt_usb_ctlr': '0',
+ 'host_usb_dev_node': '/dev/usbdev-p2371-2180',
# This parameter is optional /if/ you only have a single board
# attached to your host at a time.
- "host_usb_port_path": "3-13",
+ 'host_usb_port_path': '3-13',
},
)
-# Optional entries (required only when "alt_id_test_file" and
-# "alt_id_dummy_file" are specified).
-test_file_name = "/dfu_test.bin"
-dummy_file_name = "/dfu_dummy.bin"
-# Above files are used to generate proper "alt_info" entry
-"alt_info": "/%s ext4 0 2;/%s ext4 0 2" % (test_file_name, dummy_file_name),
+# Optional entries (required only when 'alt_id_test_file' and
+# 'alt_id_dummy_file' are specified).
+test_file_name = '/dfu_test.bin'
+dummy_file_name = '/dfu_dummy.bin'
+# Above files are used to generate proper 'alt_info' entry
+'alt_info': '/%s ext4 0 2;/%s ext4 0 2' % (test_file_name, dummy_file_name),
env__dfu_configs = (
# eMMC, partition 1
{
- "fixture_id": "emmc",
- "alt_info": "/dfu_test.bin ext4 0 1;/dfu_dummy.bin ext4 0 1",
- "cmd_params": "mmc 0",
+ 'fixture_id': 'emmc',
+ 'alt_info': '/dfu_test.bin ext4 0 1;/dfu_dummy.bin ext4 0 1',
+ 'cmd_params': 'mmc 0',
# This value is optional.
# If present, it specified the set of transfer sizes tested.
# If missing, a default list of sizes will be used, which covers
@@ -49,7 +49,7 @@
# Manually specifying test sizes is useful if you wish to test 4 DFU
# configurations, but don't want to test every single transfer size
# on each, to avoid bloating the overall time taken by testing.
- "test_sizes": (63, 64, 65),
+ 'test_sizes': (63, 64, 65),
# This value is optional.
# The name of the environment variable that the the dfu command reads
# alt info from. If unspecified, this defaults to dfu_alt_info, which is
@@ -57,17 +57,17 @@
# One example is the Odroid XU3, which automatically generates
# $dfu_alt_info, each time the dfu command is run, by concatenating
# $dfu_alt_boot and $dfu_alt_system.
- "alt_info_env_name": "dfu_alt_system",
+ 'alt_info_env_name': 'dfu_alt_system',
# This value is optional.
- # For boards which require the "test file" alt setting number other than
+ # For boards which require the 'test file' alt setting number other than
# default (0) it is possible to specify exact file name to be used as
# this parameter.
- "alt_id_test_file": test_file_name,
+ 'alt_id_test_file': test_file_name,
# This value is optional.
- # For boards which require the "dummy file" alt setting number other
+ # For boards which require the 'dummy file' alt setting number other
# than default (1) it is possible to specify exact file name to be used
# as this parameter.
- "alt_id_dummy_file": dummy_file_name,
+ 'alt_id_dummy_file': dummy_file_name,
},
)
diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index a66c6e6..d6b214f 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -35,17 +35,17 @@
# static IP. If solely relying on DHCP, this variable may be omitted or set to
# an empty list.
env__net_static_env_vars = [
- ("ipaddr", "10.0.0.100"),
- ("netmask", "255.255.255.0"),
- ("serverip", "10.0.0.1"),
+ ('ipaddr', '10.0.0.100'),
+ ('netmask', '255.255.255.0'),
+ ('serverip', '10.0.0.1'),
]
# Details regarding a file that may be read from a TFTP server. This variable
# may be omitted or set to None if TFTP testing is not possible or desired.
env__efi_loader_helloworld_file = {
- "fn": "lib/efi_loader/helloworld.efi",
- "size": 5058624,
- "crc32": "c2244b26",
+ 'fn': 'lib/efi_loader/helloworld.efi',
+ 'size': 5058624,
+ 'crc32': 'c2244b26',
}
"""
diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py
index 7459ce5..798f6ee 100644
--- a/test/py/tests/test_fpga.py
+++ b/test/py/tests/test_fpga.py
@@ -24,40 +24,40 @@
# static IP. In this test case we atleast need serverip for performing tftpb
# to get required files.
env__net_static_env_vars = [
- ("ipaddr", "10.0.0.100"),
- ("netmask", "255.255.255.0"),
- ("serverip", "10.0.0.1"),
+ ('ipaddr', '10.0.0.100'),
+ ('netmask', '255.255.255.0'),
+ ('serverip', '10.0.0.1'),
]
# Details regarding the files that may be read from a TFTP server. .
env__fpga_secure_readable_file = {
- "fn": "auth_bhdr_ppk1_bit.bin",
- "enckupfn": "auth_bhdr_enc_kup_load_bit.bin",
- "addr": 0x1000000,
- "keyaddr": 0x100000,
- "keyfn": "key.txt",
+ 'fn': 'auth_bhdr_ppk1_bit.bin',
+ 'enckupfn': 'auth_bhdr_enc_kup_load_bit.bin',
+ 'addr': 0x1000000,
+ 'keyaddr': 0x100000,
+ 'keyfn': 'key.txt',
}
env__fpga_under_test = {
- "dev": 0,
- "addr" : 0x1000000,
- "bitstream_load": "compress.bin",
- "bitstream_load_size": 1831960,
- "bitstream_loadp": "compress_pr.bin",
- "bitstream_loadp_size": 423352,
- "bitstream_loadb": "compress.bit",
- "bitstream_loadb_size": 1832086,
- "bitstream_loadbp": "compress_pr.bit",
- "bitstream_loadbp_size": 423491,
- "mkimage_legacy": "download.ub",
- "mkimage_legacy_size": 13321468,
- "mkimage_legacy_gz": "download.gz.ub",
- "mkimage_legacy_gz_size": 53632,
- "mkimage_fit": "download-fit.ub",
- "mkimage_fit_size": 13322784,
- "loadfs": "mmc 0 compress.bin",
- "loadfs_size": 1831960,
- "loadfs_block_size": 0x10000,
+ 'dev': 0,
+ 'addr' : 0x1000000,
+ 'bitstream_load': 'compress.bin',
+ 'bitstream_load_size': 1831960,
+ 'bitstream_loadp': 'compress_pr.bin',
+ 'bitstream_loadp_size': 423352,
+ 'bitstream_loadb': 'compress.bit',
+ 'bitstream_loadb_size': 1832086,
+ 'bitstream_loadbp': 'compress_pr.bit',
+ 'bitstream_loadbp_size': 423491,
+ 'mkimage_legacy': 'download.ub',
+ 'mkimage_legacy_size': 13321468,
+ 'mkimage_legacy_gz': 'download.gz.ub',
+ 'mkimage_legacy_gz_size': 53632,
+ 'mkimage_fit': 'download-fit.ub',
+ 'mkimage_fit_size': 13322784,
+ 'loadfs': 'mmc 0 compress.bin',
+ 'loadfs_size': 1831960,
+ 'loadfs_block_size': 0x10000,
}
"""
diff --git a/test/py/tests/test_fs/conftest.py b/test/py/tests/test_fs/conftest.py
index 60b4a2d..43eeb4b 100644
--- a/test/py/tests/test_fs/conftest.py
+++ b/test/py/tests/test_fs/conftest.py
@@ -54,7 +54,7 @@
supported_fs = config.getoption('fs_type')
if supported_fs:
- print("*** FS TYPE modified: %s" % supported_fs)
+ print('*** FS TYPE modified: %s' % supported_fs)
supported_fs_basic = intersect(supported_fs, supported_fs_basic)
supported_fs_ext = intersect(supported_fs, supported_fs_ext)
supported_fs_mkdir = intersect(supported_fs, supported_fs_mkdir)
@@ -174,7 +174,7 @@
Return:
True if available, False if not.
"""
- for path in os.environ["PATH"].split(os.pathsep):
+ for path in os.environ['PATH'].split(os.pathsep):
fn = os.path.join(path, tool)
if os.path.isfile(fn) and os.access(fn, os.X_OK):
return True
@@ -202,9 +202,9 @@
check_call('guestmount -a %s -m /dev/sda %s'
% (device, mount_point), shell=True)
else:
- mount_opt = "loop,rw"
+ mount_opt = 'loop,rw'
if re.match('fat', fs_type):
- mount_opt += ",umask=0000"
+ mount_opt += ',umask=0000'
check_call('sudo mount -o %s %s %s'
% (mount_opt, device, mount_point), shell=True)
diff --git a/test/py/tests/test_mmc_rd.py b/test/py/tests/test_mmc_rd.py
index c5858cb..a13bc0a 100644
--- a/test/py/tests/test_mmc_rd.py
+++ b/test/py/tests/test_mmc_rd.py
@@ -14,45 +14,45 @@
env__mmc_rd_configs = (
{
- "fixture_id": "emmc-boot0",
- "is_emmc": True,
- "devid": 0,
- "partid": 1,
- "sector": 0x10,
- "count": 1,
+ 'fixture_id': 'emmc-boot0',
+ 'is_emmc': True,
+ 'devid': 0,
+ 'partid': 1,
+ 'sector': 0x10,
+ 'count': 1,
},
{
- "fixture_id": "emmc-boot1",
- "is_emmc": True,
- "devid": 0,
- "partid": 2,
- "sector": 0x10,
- "count": 1,
+ 'fixture_id': 'emmc-boot1',
+ 'is_emmc': True,
+ 'devid': 0,
+ 'partid': 2,
+ 'sector': 0x10,
+ 'count': 1,
},
{
- "fixture_id": "emmc-data",
- "is_emmc": True,
- "devid": 0,
- "partid": 0,
- "sector": 0x10,
- "count": 0x1000,
+ 'fixture_id': 'emmc-data',
+ 'is_emmc': True,
+ 'devid': 0,
+ 'partid': 0,
+ 'sector': 0x10,
+ 'count': 0x1000,
},
{
- "fixture_id": "sd-mbr",
- "is_emmc": False,
- "devid": 1,
- "partid": None,
- "sector": 0,
- "count": 1,
- "crc32": "8f6ecf0d",
+ 'fixture_id': 'sd-mbr',
+ 'is_emmc': False,
+ 'devid': 1,
+ 'partid': None,
+ 'sector': 0,
+ 'count': 1,
+ 'crc32': '8f6ecf0d',
},
{
- "fixture_id": "sd-large",
- "is_emmc": False,
- "devid": 1,
- "partid": None,
- "sector": 0x10,
- "count": 0x1000,
+ 'fixture_id': 'sd-large',
+ 'is_emmc': False,
+ 'devid': 1,
+ 'partid': None,
+ 'sector': 0x10,
+ 'count': 0x1000,
},
)
"""
@@ -92,9 +92,9 @@
response = u_boot_console.run_command(cmd)
assert 'no card present' not in response
if is_emmc:
- partid_response = "(part %d)" % partid
+ partid_response = '(part %d)' % partid
else:
- partid_response = ""
+ partid_response = ''
good_response = 'mmc%d%s is current device' % (devid, partid_response)
assert good_response in response
diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index 2821ce6..9c395e6 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -33,27 +33,27 @@
# static IP. If solely relying on DHCP, this variable may be omitted or set to
# an empty list.
env__net_static_env_vars = [
- ("ipaddr", "10.0.0.100"),
- ("netmask", "255.255.255.0"),
- ("serverip", "10.0.0.1"),
+ ('ipaddr', '10.0.0.100'),
+ ('netmask', '255.255.255.0'),
+ ('serverip', '10.0.0.1'),
]
# Details regarding a file that may be read from a TFTP server. This variable
# may be omitted or set to None if TFTP testing is not possible or desired.
env__net_tftp_readable_file = {
- "fn": "ubtest-readable.bin",
- "addr": 0x10000000,
- "size": 5058624,
- "crc32": "c2244b26",
+ 'fn': 'ubtest-readable.bin',
+ 'addr': 0x10000000,
+ 'size': 5058624,
+ 'crc32': 'c2244b26',
}
# Details regarding a file that may be read from a NFS server. This variable
# may be omitted or set to None if NFS testing is not possible or desired.
env__net_nfs_readable_file = {
- "fn": "ubtest-readable.bin",
- "addr": 0x10000000,
- "size": 5058624,
- "crc32": "c2244b26",
+ 'fn': 'ubtest-readable.bin',
+ 'addr': 0x10000000,
+ 'size': 5058624,
+ 'crc32': 'c2244b26',
}
"""
diff --git a/test/py/tests/test_ums.py b/test/py/tests/test_ums.py
index e8eb43c..749b160 100644
--- a/test/py/tests/test_ums.py
+++ b/test/py/tests/test_ums.py
@@ -23,35 +23,35 @@
# Leave this list empty if you have no block_devs below with writable
# partitions defined.
env__mount_points = (
- "/mnt/ubtest-mnt-p2371-2180-na",
+ '/mnt/ubtest-mnt-p2371-2180-na',
)
env__usb_dev_ports = (
{
- "fixture_id": "micro_b",
- "tgt_usb_ctlr": "0",
- "host_ums_dev_node": "/dev/disk/by-path/pci-0000:00:14.0-usb-0:13:1.0-scsi-0:0:0:0",
+ 'fixture_id': 'micro_b',
+ 'tgt_usb_ctlr': '0',
+ 'host_ums_dev_node': '/dev/disk/by-path/pci-0000:00:14.0-usb-0:13:1.0-scsi-0:0:0:0',
},
)
env__block_devs = (
# eMMC; always present
{
- "fixture_id": "emmc",
- "type": "mmc",
- "id": "0",
+ 'fixture_id': 'emmc',
+ 'type': 'mmc',
+ 'id': '0',
# The following two properties are optional.
# If present, the partition will be mounted and a file written-to and
# read-from it. If missing, only a simple block read test will be
# performed.
- "writable_fs_partition": 1,
- "writable_fs_subdir": "tmp/",
+ 'writable_fs_partition': 1,
+ 'writable_fs_subdir': 'tmp/',
},
# SD card; present since I plugged one in
{
- "fixture_id": "sd",
- "type": "mmc",
- "id": "1"
+ 'fixture_id': 'sd',
+ 'type': 'mmc',
+ 'id': '1'
},
)