summaryrefslogtreecommitdiff
path: root/ttystatus
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-04-15 15:32:09 +0100
committerLars Wirzenius <liw@liw.fi>2012-04-15 15:32:09 +0100
commit679fb17bad17d85c950d258b713050a8e293ccd4 (patch)
tree74a4eddfc98f2fdd848536cbe099187489cc45e7 /ttystatus
parent9123ef968f09aab58746679dd86d837ea1566aa3 (diff)
downloadpython-ttystatus-679fb17bad17d85c950d258b713050a8e293ccd4.tar.gz
Add test to verify widget updates happen without rendering
Diffstat (limited to 'ttystatus')
-rw-r--r--ttystatus/status_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ttystatus/status_tests.py b/ttystatus/status_tests.py
index d333404..03a0499 100644
--- a/ttystatus/status_tests.py
+++ b/ttystatus/status_tests.py
@@ -122,3 +122,11 @@ class TerminalStatusTests(unittest.TestCase):
self.ts.enable()
self.assert_(self.ts._m.enabled)
+ def test_counts_correctly_even_without_rendering(self):
+ w = ttystatus.Counter('value')
+ n = 42
+ self.ts.add(w)
+ for i in range(n):
+ self.ts['value'] = i
+ self.assertEqual(str(w), str(n))
+