summaryrefslogtreecommitdiff
path: root/ttystatus/percent_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/percent_tests.py')
-rw-r--r--ttystatus/percent_tests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ttystatus/percent_tests.py b/ttystatus/percent_tests.py
index c7d8d64..9ffe0b9 100644
--- a/ttystatus/percent_tests.py
+++ b/ttystatus/percent_tests.py
@@ -24,18 +24,21 @@ class PercentDoneTests(unittest.TestCase):
def setUp(self):
self.w = ttystatus.PercentDone('done', 'total', decimals=1)
+ def test_is_not_static_width(self):
+ self.assertFalse(self.w.static_width)
+
def test_shows_zero_value_initially(self):
- self.assertEqual(self.w.render(), '0.0 %')
+ self.assertEqual(self.w.render(0), '0.0 %')
def test_sets_value(self):
self.w.update({ 'done': 50, 'total': 100 })
- self.assertEqual(self.w.render(), '50.0 %')
+ self.assertEqual(self.w.render(0), '50.0 %')
def test_handles_empty_strings_as_values(self):
self.w.update({ 'done': '', 'total': '' })
- self.assertEqual(self.w.render(), '0.0 %')
+ self.assertEqual(self.w.render(0), '0.0 %')
def test_handles_zero_total(self):
self.w.update({ 'done': 0, 'total': 0 })
- self.assertEqual(self.w.render(), '0.0 %')
+ self.assertEqual(self.w.render(0), '0.0 %')