pylint: fix errors and warnings generated by tests/qemu-iotests/297

Test 297 in tests/qemu-iotests currently fails: pylint has
learned new things to check, or we simply missed them.

All fixes in this patch are related to additional spaces used
or wrong indentation. No functional change intended.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20211008062821.1010967-2-eesposit@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
Emanuele Giuseppe Esposito 2021-10-08 02:28:20 -04:00 committed by Hanna Reitz
parent 9a5d135267
commit 87e4d4a205
5 changed files with 29 additions and 27 deletions

View File

@ -77,8 +77,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase):
self.do_test_stop("drive-backup", device="drive0",
target=self.target_img, format=iotests.imgfmt,
sync="full",
x_perf={ 'max-chunk': 65536,
'max-workers': 8 })
x_perf={'max-chunk': 65536,
'max-workers': 8})
def test_block_commit(self):
# Add overlay above the source node so that we actually use a

View File

@ -37,10 +37,11 @@ def make_argparser() -> argparse.ArgumentParser:
p.add_argument('-d', dest='debug', action='store_true', help='debug')
p.add_argument('-p', dest='print', action='store_true',
help='redirects qemu\'s stdout and stderr to the test output')
help='redirects qemu\'s stdout and stderr to '
'the test output')
p.add_argument('-gdb', action='store_true',
help="start gdbserver with $GDB_OPTIONS options \
('localhost:12345' if $GDB_OPTIONS is empty)")
help="start gdbserver with $GDB_OPTIONS options "
"('localhost:12345' if $GDB_OPTIONS is empty)")
p.add_argument('-valgrind', action='store_true',
help='use valgrind, sets VALGRIND_QEMU environment '
'variable')

View File

@ -1363,7 +1363,8 @@ class ReproducibleStreamWrapper:
class ReproducibleTestRunner(unittest.TextTestRunner):
def __init__(self, stream: Optional[TextIO] = None,
resultclass: Type[unittest.TestResult] = ReproducibleTestResult,
resultclass: Type[unittest.TestResult] =
ReproducibleTestResult,
**kwargs: Any) -> None:
rstream = ReproducibleStreamWrapper(stream or sys.stdout)
super().__init__(stream=rstream, # type: ignore

View File

@ -115,8 +115,8 @@ def do_test(use_cbw, base_img_path, fleece_img_path, nbd_sock_path, vm):
nbd_uri = 'nbd+unix:///%s?socket=%s' % (tmp_node, nbd_sock_path)
log(vm.qmp('nbd-server-start',
{'addr': { 'type': 'unix',
'data': { 'path': nbd_sock_path } } }))
{'addr': {'type': 'unix',
'data': {'path': nbd_sock_path}}}))
log(vm.qmp('nbd-server-add', device=tmp_node))