diff options
| author | Miguel de Dios <tres.14159@gmail.com> | 2020-05-31 03:53:43 +0200 |
|---|---|---|
| committer | Miguel de Dios <tres.14159@gmail.com> | 2020-05-31 03:53:43 +0200 |
| commit | 5306b148870124af6bb3f8070dadaa677c47c369 (patch) | |
| tree | 6b425ac387ac49afa6b60ed67cc20bfbc48a7bb7 /urwid | |
| parent | 45cae89f43f5fd1a066631ce19f982cbac06dd73 (diff) | |
| download | urwid-5306b148870124af6bb3f8070dadaa677c47c369.tar.gz | |
Added a test to check the linebox.pack is good.
Diffstat (limited to 'urwid')
| -rw-r--r-- | urwid/tests/test_graphics.py | 10 |
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("") |
