From ac8365ce6fc9071527b16cd1404d05b6c4db2e32 2016-04-22 14:30:19 From: Min RK Date: 2016-04-22 14:30:19 Subject: [PATCH] test nonascii exceptions --- diff --git a/IPython/core/tests/test_ultratb.py b/IPython/core/tests/test_ultratb.py index 9d1f26a..27b6fc4 100644 --- a/IPython/core/tests/test_ultratb.py +++ b/IPython/core/tests/test_ultratb.py @@ -99,6 +99,21 @@ class NonAsciiTest(unittest.TestCase): with tt.AssertPrints("ZeroDivisionError"): with tt.AssertPrints(u'дбИЖ', suppress=False): ip.run_cell('fail()') + + def test_nonascii_msg(self): + cell = u"raise Exception('é')" + expected = u"Exception('é')" + ip.run_cell("%xmode plain") + with tt.AssertPrints(expected): + ip.run_cell(cell) + + ip.run_cell("%xmode verbose") + with tt.AssertPrints(expected): + ip.run_cell(cell) + + ip.run_cell("%xmode context") + with tt.AssertPrints(expected): + ip.run_cell(cell) class NestedGenExprTestCase(unittest.TestCase):