summaryrefslogtreecommitdiff
path: root/urwid
diff options
context:
space:
mode:
authorMiguel de Dios <tres.14159@gmail.com>2020-05-31 03:53:43 +0200
committerMiguel de Dios <tres.14159@gmail.com>2020-05-31 03:53:43 +0200
commit5306b148870124af6bb3f8070dadaa677c47c369 (patch)
tree6b425ac387ac49afa6b60ed67cc20bfbc48a7bb7 /urwid
parent45cae89f43f5fd1a066631ce19f982cbac06dd73 (diff)
downloadurwid-5306b148870124af6bb3f8070dadaa677c47c369.tar.gz
Added a test to check the linebox.pack is good.
Diffstat (limited to 'urwid')
-rw-r--r--urwid/tests/test_graphics.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/urwid/tests/test_graphics.py b/urwid/tests/test_graphics.py
index 08e34d2..05808fc 100644
--- a/urwid/tests/test_graphics.py
+++ b/urwid/tests/test_graphics.py
@@ -11,6 +11,16 @@ class LineBoxTest(unittest.TestCase):
bytes().join([l, B(" "), r]),
bytes().join([bl, b, br]),]
+ def test_linebox_pack(self):
+ # Bug #346 'pack' Padding does not run with LineBox
+ urwid.set_encoding("utf-8")
+ t = urwid.Text("AAA\nCCC\nDDD")
+ size = t.pack()
+ l = urwid.LineBox(t)
+
+ self.assertEqual(l.pack()[0], size[0] + 2)
+ self.assertEqual(l.pack()[1], size[1] + 2)
+
def test_linebox_border(self):
urwid.set_encoding("utf-8")
t = urwid.Text("")