On Tue, 2013-12-17 at 18:21 -0500, mulhern wrote:
Because doing documentation reminded me that RAID was an initialism
changed some exception messages to use RAID instead of raid and changed
some tests to match.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/devicelibs/raid.py | 121 +++++++++++++++++++++++++++----------
tests/devicefactory_test.py | 6 +-
tests/devicelibs_test/raid_test.py | 6 +-
tests/devices_test.py | 12 ++--
4 files changed, 102 insertions(+), 43 deletions(-)
diff --git a/blivet/devicelibs/raid.py b/blivet/devicelibs/raid.py
index b55804c..941f02d 100644
--- a/blivet/devicelibs/raid.py
+++ b/blivet/devicelibs/raid.py
@@ -26,33 +26,44 @@ import abc
from ..errors import RaidError
def div_up(a,b):
- """Rounds up integer division."""
- return (a + (b - 1))/b
+ """Rounds up integer division. For example, div_up(3, 2) is 2.
-class RAIDLevel(object):
+ :param int a: the dividend
+ :param int b: the divisor
Didn't know one can specify type directly on
the :param line. Nice!
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic