From: Thomas Huth <thuth@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
David Hildenbrand <david@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Zhao Liu <zhao1.liu@intel.com>, qemu-devel@nongnu.org
Subject: [PATCH] tests/functional/x86_64/test_virtio_balloon: Fix cosmetic issues from pylint
Date: Wed, 29 Oct 2025 08:53:42 +0100 [thread overview]
Message-ID: <20251029075342.47335-1-thuth@redhat.com> (raw)
From: Thomas Huth <thuth@redhat.com>
Pylint complains about some style issues in this file: Unused variables
should be marked with an underscore, "when > then and when < now"
can be simplified to "now > when > then" and expectData doesn't conform
to the usual snake_case naming style.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/x86_64/test_virtio_balloon.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/functional/x86_64/test_virtio_balloon.py b/tests/functional/x86_64/test_virtio_balloon.py
index 5877b6c408c..7a579e0d69a 100755
--- a/tests/functional/x86_64/test_virtio_balloon.py
+++ b/tests/functional/x86_64/test_virtio_balloon.py
@@ -66,7 +66,7 @@ def assert_initial_stats(self):
when = ret.get('last-update')
assert when == 0
stats = ret.get('stats')
- for name, val in stats.items():
+ for _name, val in stats.items():
assert val == UNSET_STATS_VALUE
def assert_running_stats(self, then):
@@ -87,10 +87,10 @@ def assert_running_stats(self, then):
now = time.time()
- assert when > then and when < now
+ assert now > when > then
stats = ret.get('stats')
# Stat we expect this particular Kernel to have set
- expectData = [
+ expect_data = [
"stat-available-memory",
"stat-disk-caches",
"stat-free-memory",
@@ -103,7 +103,7 @@ def assert_running_stats(self, then):
"stat-total-memory",
]
for name, val in stats.items():
- if name in expectData:
+ if name in expect_data:
assert val != UNSET_STATS_VALUE
else:
assert val == UNSET_STATS_VALUE
--
2.51.0
next reply other threads:[~2025-10-29 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 7:53 Thomas Huth [this message]
2025-10-29 7:59 ` [PATCH] tests/functional/x86_64/test_virtio_balloon: Fix cosmetic issues from pylint Manos Pitsidianakis
2025-10-29 15:42 ` Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251029075342.47335-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=david@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).