Skip to content

Commit d392694

Browse files
committed
Fix tests
1 parent 17f7efe commit d392694

File tree

3 files changed

+2
-26
lines changed

3 files changed

+2
-26
lines changed

Lib/test/test_ast.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,16 +2031,12 @@ def test_suites(self):
20312031
self._check_content(s, try_stmt.body[0], 'raise RuntimeError')
20322032
self._check_content(s, try_stmt.handlers[0].type, 'TypeError')
20332033

2034-
# TODO: RUSTPYTHON
2035-
@unittest.expectedFailure
20362034
def test_fstring(self):
20372035
s = 'x = f"abc {x + y} abc"'
20382036
fstr = self._parse_value(s)
20392037
binop = fstr.values[1].value
20402038
self._check_content(s, binop, 'x + y')
20412039

2042-
# TODO: RUSTPYTHON
2043-
@unittest.expectedFailure
20442040
def test_fstring_multi_line(self):
20452041
s = dedent('''
20462042
f"""Some multi-line text.

Lib/test/test_fstring.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ def __call__(self):
8383
# Make sure x was called.
8484
self.assertTrue(x.called)
8585

86-
# TODO: RUSTPYTHON - binop lineno
87-
@unittest.expectedFailure
8886
def test_ast_line_numbers(self):
8987
expr = """
9088
a = 10
@@ -116,8 +114,6 @@ def test_ast_line_numbers(self):
116114
self.assertEqual(binop.left.col_offset, 3)
117115
self.assertEqual(binop.right.col_offset, 7)
118116

119-
# TODO: RUSTPYTHON binops lineno and col_offset
120-
@unittest.expectedFailure
121117
def test_ast_line_numbers_multiple_formattedvalues(self):
122118
expr = """
123119
f'no formatted values'
@@ -170,8 +166,6 @@ def test_ast_line_numbers_multiple_formattedvalues(self):
170166
self.assertEqual(binop2.left.col_offset, 23)
171167
self.assertEqual(binop2.right.col_offset, 27)
172168

173-
# TODO: RUSTPYTHON binops lineno and col_offset
174-
@unittest.expectedFailure
175169
def test_ast_line_numbers_nested(self):
176170
expr = """
177171
a = 10
@@ -217,8 +211,6 @@ def test_ast_line_numbers_nested(self):
217211
self.assertEqual(call.lineno, 3)
218212
self.assertEqual(call.col_offset, 11)
219213

220-
# TODO: RUSTPYTHON binops lineno and col_offset
221-
@unittest.expectedFailure
222214
def test_ast_line_numbers_duplicate_expression(self):
223215
expr = """
224216
a = 10
@@ -285,8 +277,6 @@ def test_ast_line_numbers_duplicate_expression(self):
285277
self.assertEqual(binop.left.col_offset, 23)
286278
self.assertEqual(binop.right.col_offset, 27)
287279

288-
# TODO: RUSTPYTHON err col_offset and missing end_* attributes
289-
@unittest.expectedFailure
290280
def test_ast_numbers_fstring_with_formatting(self):
291281

292282
t = ast.parse('f"Here is that pesky {xxx:.3f} again"')
@@ -310,8 +300,6 @@ def test_ast_numbers_fstring_with_formatting(self):
310300
self.assertEqual(name.col_offset, 22)
311301
self.assertEqual(name.end_col_offset, 25)
312302

313-
# TODO: RUSTPYTHON col_offset and binop lineno and col_offset
314-
@unittest.expectedFailure
315303
def test_ast_line_numbers_multiline_fstring(self):
316304
# See bpo-30465 for details.
317305
expr = """
@@ -391,8 +379,6 @@ def test_ast_line_numbers_multiline_fstring(self):
391379
self.assertEqual(t.body[0].value.values[1].value.col_offset, 11)
392380
self.assertEqual(t.body[0].value.values[1].value.end_col_offset, 16)
393381

394-
# TODO: RUSTPYTHON lineno, col_offset, end*
395-
@unittest.expectedFailure
396382
def test_ast_line_numbers_with_parentheses(self):
397383
expr = """
398384
x = (
@@ -470,8 +456,6 @@ def test_ast_compile_time_concat(self):
470456
exec(c)
471457
self.assertEqual(x[0], 'foo3')
472458

473-
# TODO: RUSTPYTHON
474-
@unittest.expectedFailure
475459
def test_compile_time_concat_errors(self):
476460
self.assertAllRaise(SyntaxError,
477461
'cannot mix bytes and nonbytes literals',
@@ -1083,8 +1067,6 @@ def test_del(self):
10831067
"del '' f''",
10841068
])
10851069

1086-
# TODO: RUSTPYTHON
1087-
@unittest.expectedFailure
10881070
def test_mismatched_braces(self):
10891071
self.assertAllRaise(SyntaxError, "f-string: single '}' is not allowed",
10901072
["f'{{}'",

compiler/codegen/src/snapshots/rustpython_codegen__compile__tests__nested_double_async_with.snap

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)