diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-01-04 14:25:05 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-01-04 14:25:05 +0100 |
commit | 72110f33e6c864cc2336e13b1208ac6bf53e4971 (patch) | |
tree | e865590d5250acb84062c6afb9479350c54eb408 | |
parent | 633770eea2eb7591f571c44506364f965c8f8147 (diff) | |
download | udisks-72110f33e6c864cc2336e13b1208ac6bf53e4971.tar.gz |
integration-test: PEP-8 fixes
-rwxr-xr-x | src/tests/integration-test | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/tests/integration-test b/src/tests/integration-test index fa38db2..105ea5e 100755 --- a/src/tests/integration-test +++ b/src/tests/integration-test @@ -363,7 +363,8 @@ class UDisksTestCase(unittest.TestCase): for d in (os.path.join(make_vars['localstatedir'], 'run', 'udisks2'), os.path.join(make_vars['localstatedir'], 'lib', 'udisks2')): if not os.path.exists(d): - sys.stderr.write('The directory %s does not exist; please create it before running these tests.\n' % d) + sys.stderr.write('The directory %s does not exist; please ' + 'create it before running these tests.\n' % d) sys.exit(0) @classmethod @@ -376,7 +377,8 @@ class UDisksTestCase(unittest.TestCase): ''' # ensure that the scsi_debug module is loaded if os.path.isdir('/sys/module/scsi_debug'): - sys.stderr.write('The scsi_debug module is already loaded; please remove before running this test.\n') + sys.stderr.write('The scsi_debug module is already loaded; please ' + 'remove before running this test.\n') sys.exit(1) # work around scsi_debug not implementing CD-ROM SCSI commands, so that @@ -385,8 +387,10 @@ class UDisksTestCase(unittest.TestCase): if os.path.isdir('/run/udev') and not os.path.exists(scsi_debug_rules): os.makedirs('/run/udev/rules.d', exist_ok=True) with open(scsi_debug_rules, 'w') as f: - f.write('''KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ATTRS{model}=="scsi_debug*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" -''') + f.write('KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ' + 'ATTRS{model}=="scsi_debug*", ' + 'ENV{ID_CDROM_MEDIA}=="?*", ' + 'IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"\n') # reload udev subprocess.call('sync; pkill --signal HUP udevd || pkill --signal HUP systemd-udevd', shell=True) @@ -429,7 +433,8 @@ class UDisksTestCase(unittest.TestCase): assert os.path.exists(rw_dev) # let's be 100% sure that we pick a virtual one - assert open('/sys/block/%s/device/model' % os.path.basename(rw_dev)).read().strip() == 'scsi_debug' + assert open('/sys/block/%s/device/model' % + os.path.basename(rw_dev)).read().strip() == 'scsi_debug' print('Set up test device: r/w: %s, r/o: %s' % (rw_dev, ro_dev)) return (rw_dev, ro_dev) @@ -1233,8 +1238,7 @@ class Smart(UDisksTestCase): # consider it a courtesy for developers :-) self.assertEqual(ata.get_property('smart-failing'), False) self.assertIn(ata.get_property('smart-selftest-status'), - ['success', 'inprogress', 'aborted', - 'interrupted']) + ['success', 'inprogress', 'aborted', 'interrupted']) else: self.write_stderr('[N/A] ') @@ -1387,7 +1391,8 @@ class Luks(UDisksTestCase): # instead of refreshing self.client, get a new one self.client = UDisks.Client.new_sync(None) time.sleep(0.1) - self.assertGreater(timeout, 0, 'timeout waiting for object path %s to disappear' % path) + self.assertGreater(timeout, 0, + 'timeout waiting for object path %s to disappear' % path) finally: self.readd_devices() |