summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-07-01 08:59:34 +1200
committerLars Wirzenius <liw@liw.fi>2010-07-01 08:59:34 +1200
commitc146f36ac78bf8201c9d0ecc0376072c97091ccd (patch)
treee4735d77ab90634ab675640e8717ee3c1a729b6f
parent8cb296a1ac5a3fc5750725c3f603e73c23db82b3 (diff)
downloadpython-ttystatus-c146f36ac78bf8201c9d0ecc0376072c97091ccd.tar.gz
Add test for zero total for PercentageDone.
-rw-r--r--ttystatus/percent_tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ttystatus/percent_tests.py b/ttystatus/percent_tests.py
index 441710d..9e29530 100644
--- a/ttystatus/percent_tests.py
+++ b/ttystatus/percent_tests.py
@@ -35,3 +35,7 @@ class PercentDoneTests(unittest.TestCase):
self.w.update({ 'done': '', 'total': '' }, 999)
self.assertEqual(str(self.w), '0.0 %')
+ def test_handles_zero_total(self):
+ self.w.update({ 'done': '', 'total': 0 }, 999)
+ self.assertEqual(str(self.w), '0.0 %')
+