All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "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>,
	"Eric Blake" <eblake@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Fam Zheng" <famz@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	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: Re: [Qemu-devel] [PATCH 6/9] iotests: replace dict.has_key() by 'in' operator for python3 compatibility
Date: Wed, 20 Dec 2017 10:07:24 +0000	[thread overview]
Message-ID: <20171220100724.GH21216@redhat.com> (raw)
In-Reply-To: <20171219173425.8113-7-f4bug@amsat.org>

On Tue, Dec 19, 2017 at 02:34:22PM -0300, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/qemu-iotests/093 | 2 +-
>  tests/qemu-iotests/096 | 4 ++--
>  tests/qemu-iotests/136 | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


> 
> diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093
> index 5c36a5fb4d..28b1d021ca 100755
> --- a/tests/qemu-iotests/093
> +++ b/tests/qemu-iotests/093
> @@ -237,7 +237,7 @@ class ThrottleTestGroupNames(iotests.QMPTestCase):
>                  if name:
>                      self.assertEqual(info["group"], name)
>                  else:
> -                    self.assertFalse(info.has_key('group'))
> +                    self.assertFalse('group' in info)
>                  return
>  
>          raise Exception("No group information found for '%s'" % device)
> diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
> index aeeb3753cf..a69439602d 100644
> --- a/tests/qemu-iotests/096
> +++ b/tests/qemu-iotests/096
> @@ -53,9 +53,9 @@ class TestLiveSnapshot(iotests.QMPTestCase):
>                  self.assertEqual(r['iops'], self.iops)
>                  self.assertEqual(r['iops_size'], self.iops_size)
>              else:
> -                self.assertFalse(r.has_key('group'))
> +                self.assertFalse('group' in r)
>                  self.assertEqual(r['iops'], 0)
> -                self.assertFalse(r.has_key('iops_size'))
> +                self.assertFalse('iops_size' in r)
>  
>      def testSnapshot(self):
>          self.checkConfig('base')
> diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136
> index 88b97ea7c6..a154d8ef9d 100644
> --- a/tests/qemu-iotests/136
> +++ b/tests/qemu-iotests/136
> @@ -203,7 +203,7 @@ sector = "%d"
>          if (self.accounted_ops(read = True, write = True, flush = True) != 0):
>              self.assertLess(0, stats['idle_time_ns'])
>          else:
> -            self.assertFalse(stats.has_key('idle_time_ns'))
> +            self.assertFalse('idle_time_ns' in stats)
>  
>          # This test does not alter these, so they must be all 0
>          self.assertEqual(0, stats['rd_merged'])
> -- 
> 2.15.1
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-12-20 10:07 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 [this message]
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 ` [Qemu-devel] [PATCH 8/9] iotests: replace assertEquals() by assertEqual() " Philippe Mathieu-Daudé
2017-12-20 10:08   ` 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=20171220100724.GH21216@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=chugh.ishani@research.iiit.ac.in \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.