##// END OF EJS Templates
TEST: Add a regression test.
Scott Sanderson -
Show More
@@ -3,8 +3,10 b''
3 3 """
4 4 import io
5 5 import os.path
6 from textwrap import dedent
6 7 import unittest
7 8
9
8 10 from IPython.testing import tools as tt
9 11 from IPython.testing.decorators import onlyif_unicode_paths
10 12 from IPython.utils.syspathcontext import prepended_to_syspath
@@ -89,6 +91,29 b' class NonAsciiTest(unittest.TestCase):'
89 91 with tt.AssertPrints(u'дбИЖ', suppress=False):
90 92 ip.run_cell('fail()')
91 93
94
95 class NestedGenExprTestCase(unittest.TestCase):
96 """
97 Regression test for the following issues:
98 https://github.com/ipython/ipython/issues/8293
99 https://github.com/ipython/ipython/issues/8205
100 """
101 def test_nested_genexpr(self):
102 code = dedent(
103 """\
104 class SpecificException(Exception):
105 pass
106
107 def foo(x):
108 raise SpecificException("Success!")
109
110 sum(sum(foo(x) for _ in [0]) for x in [0])
111 """
112 )
113 with tt.AssertPrints('SpecificException: Success!', suppress=False):
114 ip.run_cell(code)
115
116
92 117 indentationerror_file = """if True:
93 118 zoon()
94 119 """
General Comments 0
You need to be logged in to leave comments. Login now