summaryrefslogtreecommitdiff
path: root/morphlib/morphology.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-15 13:21:59 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-15 13:21:59 +0000
commit0a13e3cd6bbe15be52a47c533412852d1bc9856d (patch)
treedadc964eb4277513faa71dbedce32160b41c4adb /morphlib/morphology.py
parentd68ae94a3d327a07ad6cb06eacac34eb4d6ce408 (diff)
downloadmorph-0a13e3cd6bbe15be52a47c533412852d1bc9856d.tar.gz
Exclude from test coverage stuff without tests
The code isn't making it easy to test just the size parsing code. This code shouldn't even be in morph, it should be re-using a library (such as the one in cliapp, but cliapp doesn't expose it nicely). All of this should be fixed, but for now, I'll just exclude things from test coverage. Shame be on me.
Diffstat (limited to 'morphlib/morphology.py')
-rw-r--r--morphlib/morphology.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/morphology.py b/morphlib/morphology.py
index f637f0f4..e44e59b3 100644
--- a/morphlib/morphology.py
+++ b/morphlib/morphology.py
@@ -106,11 +106,11 @@ class Morphology(object):
size = size.lower()
if size.endswith('g'):
size = int(size[:-1]) * 1024**3
- elif size.endswith('m'):
+ elif size.endswith('m'): # pragma: no cover
size = int(size[:-1]) * 1024**2
- elif size.endswith('k'):
+ elif size.endswith('k'): # pragma: no cover
size = int(size[:-1]) * 1024
- else:
+ else: # pragma: no cover
size = int(size)
return size