[blivet:master 01/11] Add test for raid level descriptor None.
Vratislav Podzimek
vpodzime at redhat.com
Fri Jul 4 06:57:00 UTC 2014
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
More information about the anaconda-patches
mailing list