| 120 | ip.run_cell('fail()') |
| 121 | |
| 122 | def test_nonascii_msg(self): |
| 123 | cell = u"raise Exception('é')" |
| 124 | expected = u"Exception('é')" |
| 125 | ip.run_cell("%xmode plain") |
| 126 | with tt.AssertPrints(expected): |
| 127 | ip.run_cell(cell) |
| 128 | |
| 129 | ip.run_cell("%xmode verbose") |
| 130 | with tt.AssertPrints(expected): |
| 131 | ip.run_cell(cell) |
| 132 | |
| 133 | ip.run_cell("%xmode context") |
| 134 | with tt.AssertPrints(expected): |
| 135 | ip.run_cell(cell) |
| 136 | |
| 137 | ip.run_cell("%xmode minimal") |
| 138 | with tt.AssertPrints(u"Exception: é"): |
| 139 | ip.run_cell(cell) |
| 140 | |
| 141 | # Put this back into Context mode for later tests. |
| 142 | ip.run_cell("%xmode context") |
| 143 | |
| 144 | class NestedGenExprTestCase(unittest.TestCase): |
| 145 | """ |