Remove unneccessary lambda from _test_make_partitions

There's a lambda here that seems to just return the addition
of two ints. Replacing it with a simple addition seems to produce
the same result.

Change-Id: I4b188986407c4ab83848d392e76ea71c95740737
This commit is contained in:
Michael Turek 2018-06-07 17:31:19 +00:00
parent e4dda71703
commit 4e31bc5a77
1 changed files with 2 additions and 4 deletions

View File

@ -321,10 +321,8 @@ class MakePartitionsTestCase(base.IronicLibTestCase):
self.node_uuid, boot_option=boot_option,
boot_mode=boot_mode, disk_label=disk_label)
_s = lambda x, sz: x + sz
if boot_option == "local" and boot_mode == "uefi":
add_efi_sz = lambda x: str(_s(x, self.efi_size))
add_efi_sz = lambda x: str(x + self.efi_size)
expected_mkpart = ['mkpart', 'primary', 'fat32', '1',
add_efi_sz(1),
'set', '1', 'boot', 'on',
@ -335,7 +333,7 @@ class MakePartitionsTestCase(base.IronicLibTestCase):
else:
if boot_option == "local":
if disk_label == "gpt":
add_bios_sz = lambda x: str(_s(x, self.bios_size))
add_bios_sz = lambda x: str(x + self.bios_size)
expected_mkpart = ['mkpart', 'primary', '', '1',
add_bios_sz(1),
'set', '1', 'bios_grub', 'on',