(self)
| 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() |
no test coverage detected