From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Lukáš Doktor" <ldoktor@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Fam Zheng" <famz@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
"John Snow" <jsnow@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Nir Soffer" <nirsof@gmail.com>,
"Janosch Frank" <frankja@linux.vnet.ibm.com>,
"Ishani Chugh" <chugh.ishani@research.iiit.ac.in>
Subject: [Qemu-devel] [PATCH 8/9] iotests: replace assertEquals() by assertEqual() for python3 compatibility
Date: Tue, 19 Dec 2017 14:34:24 -0300 [thread overview]
Message-ID: <20171219173425.8113-9-f4bug@amsat.org> (raw)
In-Reply-To: <20171219173425.8113-1-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/qemu-iotests/041 | 6 +++---
tests/qemu-iotests/118 | 4 ++--
tests/qemu-iotests/iotests.py | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index a860a31e9a..fa0f20af0e 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -457,7 +457,7 @@ new_state = "1"
self.assert_qmp(result, 'return', {})
event = self.vm.get_qmp_event(wait=True)
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'read')
result = self.vm.qmp('query-block-jobs')
@@ -478,7 +478,7 @@ new_state = "1"
self.assert_qmp(result, 'return', {})
event = self.vm.get_qmp_event(wait=True)
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'read')
result = self.vm.qmp('query-block-jobs')
@@ -609,7 +609,7 @@ new_state = "1"
self.assert_qmp(result, 'return', {})
event = self.vm.get_qmp_event(wait=True)
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'write')
result = self.vm.qmp('query-block-jobs')
diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
index 3cf21218f0..8158b4bd25 100755
--- a/tests/qemu-iotests/118
+++ b/tests/qemu-iotests/118
@@ -295,7 +295,7 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
result = self.vm.qmp('blockdev-close-tray', device='drive0')
# Should be a no-op
self.assert_qmp(result, 'return', {})
- self.assertEquals(self.vm.get_qmp_events(wait=False), [])
+ self.assertEqual(self.vm.get_qmp_events(wait=False), [])
def test_remove_on_closed(self):
if not self.has_real_tray:
@@ -476,7 +476,7 @@ class TestChangeReadOnly(ChangeBaseClass):
read_only_mode='retain')
self.assert_qmp(result, 'error/class', 'GenericError')
- self.assertEquals(self.vm.get_qmp_events(wait=False), [])
+ self.assertEqual(self.vm.get_qmp_events(wait=False), [])
result = self.vm.qmp('query-block')
self.assert_qmp(result, 'return[0]/inserted/ro', False)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 85c9d2c211..4c515d2e6c 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -385,7 +385,7 @@ class QMPTestCase(unittest.TestCase):
def wait_ready_and_cancel(self, drive='drive0'):
self.wait_ready(drive=drive)
event = self.cancel_and_wait(drive=drive)
- self.assertEquals(event['event'], 'BLOCK_JOB_COMPLETED')
+ self.assertEqual(event['event'], 'BLOCK_JOB_COMPLETED')
self.assert_qmp(event, 'data/type', 'mirror')
self.assert_qmp(event, 'data/offset', event['data']['len'])
--
2.15.1
next prev parent reply other threads:[~2017-12-19 17:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 17:34 [Qemu-devel] [PATCH 0/9] iotests: python3 compatibility Philippe Mathieu-Daudé
2017-12-19 17:34 ` [Qemu-devel] [PATCH 1/9] qemu.py: replace iteritems() by items() for " Philippe Mathieu-Daudé
2017-12-20 9:58 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 2/9] qmp.py: encode JSON unicode as byte strings " Philippe Mathieu-Daudé
2017-12-20 10:00 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 3/9] iotests: replace print statement by print() function " Philippe Mathieu-Daudé
2017-12-20 10:03 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 4/9] iotests: use octal numbers " Philippe Mathieu-Daudé
2017-12-20 10:05 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 5/9] iotests: replace xrange() by range() " Philippe Mathieu-Daudé
2017-12-20 10:06 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 6/9] iotests: replace dict.has_key() by 'in' operator " Philippe Mathieu-Daudé
2017-12-20 10:07 ` Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 7/9] iotests: replace lambda function by lambda expression " Philippe Mathieu-Daudé
2017-12-20 10:08 ` Daniel P. Berrange
2017-12-19 17:34 ` Philippe Mathieu-Daudé [this message]
2017-12-20 10:08 ` [Qemu-devel] [PATCH 8/9] iotests: replace assertEquals() by assertEqual() " Daniel P. Berrange
2017-12-19 17:34 ` [Qemu-devel] [PATCH 9/9] iotests.py: use io.StringIO with python3 Philippe Mathieu-Daudé
2017-12-20 6:48 ` Janosch Frank
2017-12-20 10:10 ` Daniel P. Berrange
2017-12-19 21:54 ` [Qemu-devel] [PATCH 0/9] iotests: python3 compatibility Paolo Bonzini
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=20171219173425.8113-9-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=chugh.ishani@research.iiit.ac.in \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=famz@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=ldoktor@redhat.com \
--cc=mreitz@redhat.com \
--cc=nirsof@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).