[blivet:master 01/11] Add test for raid level descriptor None.

Anne Mulhern amulhern at redhat.com
Mon Jul 7 12:56:55 UTC 2014





----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Friday, July 4, 2014 2:57:00 AM
> Subject: Re: [blivet:master 01/11] Add test for raid level descriptor None.
> 
> On Thu, 2014-07-03 at 11:19 -0400, mulhern wrote:
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >  tests/devicelibs_test/raid_test.py | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tests/devicelibs_test/raid_test.py
> > b/tests/devicelibs_test/raid_test.py
> > index 75c45f1..61fc23a 100644
> > --- a/tests/devicelibs_test/raid_test.py
> > +++ b/tests/devicelibs_test/raid_test.py
> > @@ -54,6 +54,7 @@ class RaidTestCase(unittest.TestCase):
> >          self.assertIs(self.levels.raidLevel(raid.RAID0), raid.RAID0)
> >  
> >          self.assertRaises(errors.RaidError, self.levels.raidLevel,
> >          "bogus")
> > +        self.assertRaises(errors.RaidError, self.levels.raidLevel, None)
> Just a note on this: could we, at some point, transform these checks to:
> with self.assertRaises(errors.RaidError):
>     self.levels.raidLevel(None)
> 
> etc.? I think that syntax is much better readable.
> 
> --
> Vratislav Podzimek
> 
> Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
> 
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Yes, it is a good deal easier to parse. I'll add in a patch that
transforms these all to the with syntax unless anybody raises an
objection. Might as well do it right now as leave it until later.

- mulhern


More information about the anaconda-patches mailing list