MCPcopy Index your code
hub / github.com/ipython/ipython / _get_ry_syntax_errors

Method _get_ry_syntax_errors

tests/test_async_helpers.py:194–225  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192 return test_cases
193
194 def _get_ry_syntax_errors(self):
195 # This is a mix of tests that should be a syntax error if
196 # return or yield whether or not they are in a function
197
198 test_cases = []
199
200 test_cases.append(
201 (
202 "class",
203 dedent(
204 """
205 class V:
206 {val}
207 """
208 ),
209 )
210 )
211
212 test_cases.append(
213 (
214 "nested-class",
215 dedent(
216 """
217 class V:
218 class C:
219 {val}
220 """
221 ),
222 )
223 )
224
225 return test_cases
226
227 def test_top_level_return_error(self):
228 tl_err_test_cases = self._get_top_level_cases()

Callers 2

test_in_func_no_errorMethod · 0.95

Calls 1

dedentFunction · 0.85

Tested by

no test coverage detected