Show More
@@ -205,10 +205,6 b' class AsyncTest(TestCase):' | |||
|
205 | 205 | # yield is allowed in async functions, starting in Python 3.6, |
|
206 | 206 | # and yield from is not allowed in any version |
|
207 | 207 | vals = ('return', 'yield', 'yield from (_ for _ in range(3))') |
|
208 | async_safe = (True, | |
|
209 | True, | |
|
210 | False) | |
|
211 | vals = tuple(zip(vals, async_safe)) | |
|
212 | 208 | |
|
213 | 209 | success_tests = zip(self._get_top_level_cases(), repeat(False)) |
|
214 | 210 | failure_tests = zip(self._get_ry_syntax_errors(), repeat(True)) |
@@ -219,14 +215,12 b' class AsyncTest(TestCase):' | |||
|
219 | 215 | for (test_name, test_case), should_fail in tests: |
|
220 | 216 | nested_case = nest_case(context, test_case) |
|
221 | 217 | |
|
222 |
for val |
|
|
223 | val_should_fail = should_fail | |
|
224 | ||
|
218 | for val in vals: | |
|
225 | 219 | test_id = (context_name, test_name, val) |
|
226 | 220 | cell = nested_case.format(val=val) |
|
227 | 221 | |
|
228 | 222 | with self.subTest(test_id): |
|
229 |
if |
|
|
223 | if should_fail: | |
|
230 | 224 | msg = ("SyntaxError not raised for %s" % |
|
231 | 225 | str(test_id)) |
|
232 | 226 | with self.assertRaises(SyntaxError, msg=msg): |
General Comments 0
You need to be logged in to leave comments.
Login now