OSDN Git Service

migrate-bitmaps-test: Fix pylint warnings
authorHanna Reitz <hreitz@redhat.com>
Thu, 2 Sep 2021 09:40:15 +0000 (11:40 +0200)
committerHanna Reitz <hreitz@redhat.com>
Wed, 15 Sep 2021 13:54:07 +0000 (15:54 +0200)
commitd8c2e47dbe998d00dcfe0ca5fc0766a98b69a591
treef551123e225cea4739fe5f2ca9f078795a13e67d
parente2ad17a62d9da45fbcddc3faa3d6ced519a9453a
migrate-bitmaps-test: Fix pylint warnings

There are a couple of things pylint takes issue with:
- The "time" import is unused
- The import order (iotests should come last)
- get_bitmap_hash() doesn't use @self and so should be a function
- Semicolons at the end of some lines
- Parentheses after "if"
- Some lines are too long (80 characters instead of 79)
- inject_test_case()'s @name parameter shadows a top-level @name
  variable
- "lambda self: mc(self)" were equivalent to just "mc", but in
  inject_test_case(), it is not equivalent, so add a comment and disable
  the warning locally
- Always put two empty lines after a function
- f'exec: cat > /dev/null' does not need to be an f-string

Fix them.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210902094017.32902-4-hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
tests/qemu-iotests/tests/migrate-bitmaps-test