aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create/tests
diff options
context:
space:
mode:
authorStevan Radakovic <stevan.radakovic@linaro.org>2013-02-18 10:40:15 +0100
committerStevan Radakovic <stevan.radakovic@linaro.org>2013-02-18 10:40:15 +0100
commite31aeaaa9889e03a734d0e37ad01d4bb5c4c91f2 (patch)
treec5fd12428cd113d91f3c28f6d2aafb3afbfae2dd /linaro_image_tools/media_create/tests
parent0cafece7cf4754eeb723f844df2cbadf69824c7b (diff)
Fourth run of pep8 fixes.
Diffstat (limited to 'linaro_image_tools/media_create/tests')
-rw-r--r--linaro_image_tools/media_create/tests/test_android_boards.py11
-rw-r--r--linaro_image_tools/media_create/tests/test_media_create.py36
2 files changed, 25 insertions, 22 deletions
diff --git a/linaro_image_tools/media_create/tests/test_android_boards.py b/linaro_image_tools/media_create/tests/test_android_boards.py
index ac65b40..42398ca 100644
--- a/linaro_image_tools/media_create/tests/test_android_boards.py
+++ b/linaro_image_tools/media_create/tests/test_android_boards.py
@@ -156,9 +156,10 @@ class TestAndroidBoardsHwpack(TestCaseWithFixtures):
def test_extra_boot_args_options(self):
"""The field extra_boot_args_options should be a concatenated string.
Testing presence of a field defined in the parent class."""
- values = {'dtb_name': 'a_name',
- 'extra_boot_args_options': ['earlyprintk', 'mem=128M@0',
- 'mali.mali_mem=64M@128M']
+ values = {
+ 'dtb_name': 'a_name',
+ 'extra_boot_args_options': ['earlyprintk', 'mem=128M@0',
+ 'mali.mali_mem=64M@128M']
}
yaml_conf = self.android_hwpack_extra_boot % values
name = self._get_tmp_file_name(yaml_conf)
@@ -463,8 +464,8 @@ class TestAndroidBoardsHwpack(TestCaseWithFixtures):
'fdt_high': '0xffffffff',
'initrd_high': '0xffffffff'}
config = ((self.hwpack_format + self.hwpack_extra_boot +
- self.hwpack_extra_serial + self.hwpack_android_args) %
- values)
+ self.hwpack_extra_serial + self.hwpack_android_args) %
+ values)
self.assertBootEnv(expected, config=config, board='mx53loco')
def test_android_mx5_old(self):
diff --git a/linaro_image_tools/media_create/tests/test_media_create.py b/linaro_image_tools/media_create/tests/test_media_create.py
index d451d45..9f290a6 100644
--- a/linaro_image_tools/media_create/tests/test_media_create.py
+++ b/linaro_image_tools/media_create/tests/test_media_create.py
@@ -872,10 +872,10 @@ class TestCreateToc(TestCaseWithFixtures):
maxint = '\xFF\xFF\xFF\x7F'
minint = '\xFF\xFF\xFF\xFF'
line2 = maxint + maxint + zero + minint + minint + \
- 'hello' + zero + '\x00\x00\x00'
+ 'hello' + zero + '\x00\x00\x00'
line3 = '\x01\x00\x00\x00' '\x64\x00\x00\x00' + zero + \
- '\x05\x00\x00\x00' '\x05\x00\x00\x00' \
- 'hello' + zero + '\x00\x00\x00'
+ '\x05\x00\x00\x00' '\x05\x00\x00\x00' \
+ 'hello' + zero + '\x00\x00\x00'
self.expected = line1 + line2 + line3
self.board_conf = boards.SnowballEmmcConfig()
@@ -1358,7 +1358,7 @@ class TestBootSteps(TestCaseWithFixtures):
self.funcs_calls.append('install_samsung_boot_loader')
self.useFixture(MockSomethingFixture(os.path, 'exists',
- lambda file: True))
+ lambda file: True))
board_conf.hardwarepack_handler = (
TestSetMetadata.MockHardwarepackHandler('ahwpack.tar.gz'))
board_conf.hardwarepack_handler.get_format = (
@@ -2001,10 +2001,10 @@ class TestGetBootCmd(TestCase):
rootfs_id="UUID=deadbeef", i_img_data="initrd", d_img_data=None)
expected = {
'bootargs': 'console=ttySAC1,115200n8 root=UUID=deadbeef '
- 'rootwait ro',
+ 'rootwait ro',
'bootcmd': 'fatload mmc 0:2 0x40007000 uImage; '
- 'fatload mmc 0:2 0x42000000 uInitrd; '
- 'bootm 0x40007000 0x42000000',
+ 'fatload mmc 0:2 0x42000000 uInitrd; '
+ 'bootm 0x40007000 0x42000000',
'ethact': 'smc911x-0',
'ethaddr': '00:40:5c:26:0a:5b',
'fdt_high': '0xffffffff',
@@ -2018,10 +2018,10 @@ class TestGetBootCmd(TestCase):
rootfs_id="UUID=deadbeef", i_img_data="initrd", d_img_data=None)
expected = {
'bootargs': 'console=ttySAC2,115200n8 root=UUID=deadbeef '
- 'rootwait ro',
+ 'rootwait ro',
'bootcmd': 'fatload mmc 0:2 0x40007000 uImage; '
- 'fatload mmc 0:2 0x42000000 uInitrd; '
- 'bootm 0x40007000 0x42000000',
+ 'fatload mmc 0:2 0x42000000 uInitrd; '
+ 'bootm 0x40007000 0x42000000',
'fdt_high': '0xffffffff',
'initrd_high': '0xffffffff'}
self.assertEqual(expected, boot_commands)
@@ -2035,8 +2035,8 @@ class TestGetBootCmd(TestCase):
'bootargs': 'console=ttySAC2,115200n8 root=UUID=deadbeef '
'rootwait ro',
'bootcmd': 'fatload mmc 0:2 0x40007000 uImage; '
- 'fatload mmc 0:2 0x42000000 uInitrd; '
- 'bootm 0x40007000 0x42000000',
+ 'fatload mmc 0:2 0x42000000 uInitrd; '
+ 'bootm 0x40007000 0x42000000',
'fdt_high': '0xffffffff',
'initrd_high': '0xffffffff'}
self.assertEqual(expected, boot_commands)
@@ -2372,7 +2372,8 @@ class TestBoards(TestCaseWithFixtures):
self.useFixture(MockSomethingFixture(
os.path, "getsize",
lambda s: (BoardConfig.LOADER_MIN_SIZE_S - 1) * SECTOR_SIZE + 1))
- self.assertRaises(AssertionError,
+ self.assertRaises(
+ AssertionError,
install_mx5_boot_loader, "imx_file", "boot_device_or_file",
BoardConfig.LOADER_MIN_SIZE_S)
@@ -3370,8 +3371,8 @@ class TestPopulateBoot(TestCaseWithFixtures):
self.config.hardwarepack_handler = \
TestSetMetadata.MockHardwarepackHandler('ahwpack.tar.gz')
self.config.hardwarepack_handler.get_format = lambda: '3.0'
- self.config.hardwarepack_handler.get_file = \
- lambda file_alias: ['file1', 'file2']
+ self.config.hardwarepack_handler.get_file = lambda file_alias:
+ ['file1', 'file2']
self.config.hardwarepack_handler.get_file_from_package = \
self.get_file_from_package
self.config.bootloader_copy_files = {
@@ -3417,7 +3418,8 @@ class TestPopulateBoot(TestCaseWithFixtures):
self.config.bootloader = "u_boot"
self.call_populate_boot(self.config)
expected_calls = self.expected_calls[:]
- expected_calls.insert(2,
+ expected_calls.insert(
+ 2,
'%s cp -v chroot_dir/usr/lib/u-boot/bootloader_flavor/u-boot.bin '
'boot_disk' % sudo_args)
self.assertEquals(
@@ -3809,7 +3811,7 @@ class TestInstallHWPack(TestCaseWithFixtures):
"version: " + version,
"architecture: " + architecture,
"format: 3.0"
- ])
+ ])
print metadata
tar_file = tarfile.open(location, mode='w:gz')
tarinfo = tarfile.TarInfo("metadata")