diff options
Diffstat (limited to 'ttystatus/index_tests.py')
-rw-r--r-- | ttystatus/index_tests.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ttystatus/index_tests.py b/ttystatus/index_tests.py index 3c91903..ccc4d4c 100644 --- a/ttystatus/index_tests.py +++ b/ttystatus/index_tests.py @@ -24,14 +24,17 @@ class IndexTests(unittest.TestCase): def setUp(self): self.w = ttystatus.Index('foo', 'foos') + def test_is_not_static_width(self): + self.assertFalse(self.w.static_width) + def test_is_zero_initially(self): - self.assertEqual(str(self.w), '0/0') + self.assertEqual(self.w.render(0), '0/0') def test_gets_index_right(self): - self.w.update({ 'foo': 'x', 'foos': ['a', 'x', 'b'] }, 999) - self.assertEqual(str(self.w), '2/3') + self.w.update({ 'foo': 'x', 'foos': ['a', 'x', 'b'] }) + self.assertEqual(self.w.render(0), '2/3') def test_handles_value_not_in_list(self): - self.w.update({ 'foo': 'xxx', 'foos': ['a', 'x', 'b'] }, 999) - self.assertEqual(str(self.w), '0/3') + self.w.update({ 'foo': 'xxx', 'foos': ['a', 'x', 'b'] }) + self.assertEqual(self.w.render(0), '0/3') |