summaryrefslogtreecommitdiff
path: root/urwid/tests
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2013-12-26 15:59:50 -0500
committerIan Ward <ian@excess.org>2013-12-26 16:00:31 -0500
commit26dff198551bb47681e5b8dd5ad797e5fe8981d0 (patch)
treef13e33efae8759a144ba4682ba7dc11eb8952a6e /urwid/tests
parent7814d4c93fd43e34bdfc2c54189e7efb9fe802f1 (diff)
downloadurwid-26dff198551bb47681e5b8dd5ad797e5fe8981d0.tar.gz
test for exception due to user encoding
Diffstat (limited to 'urwid/tests')
-rw-r--r--urwid/tests/test_widget.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/urwid/tests/test_widget.py b/urwid/tests/test_widget.py
index 3a3da47..3ae9a93 100644
--- a/urwid/tests/test_widget.py
+++ b/urwid/tests/test_widget.py
@@ -32,6 +32,12 @@ class TextTest(unittest.TestCase):
got = self.t.render((18,))._text
assert got == expected, "got: %r expected: %r" % (got, expected)
+ def test5_encode_error(self):
+ urwid.set_encoding("ascii")
+ expected = [B("? ")]
+ got = urwid.Text(u'รป').render((3,))._text
+ assert got == expected, "got: %r expected: %r" % (got, expected)
+
class EditTest(unittest.TestCase):
def setUp(self):