Skip to content

Commit 87dd525

Browse files
committed
Mark failing tests
1 parent 1ec2b91 commit 87dd525

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Lib/test/test_future_stmt/test_future.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def test_future_multiple_features(self):
8181
):
8282
from test.test_future_stmt import test_future_multiple_features
8383

84+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
8485
def test_unknown_future_flag(self):
8586
code = """
8687
from __future__ import nested_scopes
@@ -91,6 +92,7 @@ def test_unknown_future_flag(self):
9192
message='future feature rested_snopes is not defined', offset=24,
9293
)
9394

95+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
9496
def test_future_import_not_on_top(self):
9597
code = """
9698
import some_module
@@ -111,6 +113,7 @@ def test_future_import_not_on_top(self):
111113
"""
112114
self.assertSyntaxError(code, lineno=3)
113115

116+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
114117
def test_future_import_with_extra_string(self):
115118
code = """
116119
'''Docstring'''
@@ -119,6 +122,7 @@ def test_future_import_with_extra_string(self):
119122
"""
120123
self.assertSyntaxError(code, lineno=3, parametrize_docstring=False)
121124

125+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
122126
def test_multiple_import_statements_on_same_line(self):
123127
# With `\`:
124128
code = """
@@ -133,12 +137,14 @@ def test_multiple_import_statements_on_same_line(self):
133137
"""
134138
self.assertSyntaxError(code, offset=54)
135139

140+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
136141
def test_future_import_star(self):
137142
code = """
138143
from __future__ import *
139144
"""
140145
self.assertSyntaxError(code, message='future feature * is not defined', offset=24)
141146

147+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
142148
def test_future_import_braces(self):
143149
code = """
144150
from __future__ import braces
@@ -151,6 +157,7 @@ def test_future_import_braces(self):
151157
"""
152158
self.assertSyntaxError(code, message='not a chance', offset=39)
153159

160+
@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
154161
def test_module_with_future_import_not_on_top(self):
155162
with self.assertRaises(SyntaxError) as cm:
156163
from test.test_future_stmt import badsyntax_future
@@ -183,6 +190,7 @@ def test_syntactical_future_repl(self):
183190
out = kill_python(p)
184191
self.assertNotIn(b'SyntaxError: invalid syntax', out)
185192

193+
@unittest.expectedFailure # TODO: RUSTPYTHON; SyntaxError: future feature spam is not defined
186194
def test_future_dotted_import(self):
187195
with self.assertRaises(ImportError):
188196
exec("from .__future__ import spam")
@@ -259,6 +267,7 @@ def _exec_future(self, code):
259267
)
260268
return scope
261269

270+
@unittest.expectedFailure # TODO: RUSTPYTHON; 'a,' != '(a,)'
262271
def test_annotations(self):
263272
eq = self.assertAnnotationEqual
264273
eq('...')
@@ -423,6 +432,7 @@ def test_annotations(self):
423432
eq('(((a, b)))', '(a, b)')
424433
eq("1 + 2 + 3")
425434

435+
@unittest.expectedFailure # TODO: RUSTPYTHON; "f'{x=!r}'" != "f'x={x!r}'"
426436
def test_fstring_debug_annotations(self):
427437
# f-strings with '=' don't round trip very well, so set the expected
428438
# result explicitly.
@@ -433,6 +443,7 @@ def test_fstring_debug_annotations(self):
433443
self.assertAnnotationEqual("f'{x=!a}'", expected="f'x={x!a}'")
434444
self.assertAnnotationEqual("f'{x=!s:*^20}'", expected="f'x={x!s:*^20}'")
435445

446+
@unittest.expectedFailure # TODO: RUSTPYTHON; '1e309, 1e309j' != '(1e309, 1e309j)'
436447
def test_infinity_numbers(self):
437448
inf = "1e" + repr(sys.float_info.max_10_exp + 1)
438449
infj = f"{inf}j"
@@ -445,6 +456,7 @@ def test_infinity_numbers(self):
445456
self.assertAnnotationEqual("('inf', 1e1000, 'infxxx', 1e1000j)", expected=f"('inf', {inf}, 'infxxx', {infj})")
446457
self.assertAnnotationEqual("(1e1000, (1e1000j,))", expected=f"({inf}, ({infj},))")
447458

459+
@unittest.expectedFailure # TODO: RUSTPYTHON; SyntaxError not raised
448460
def test_annotation_with_complex_target(self):
449461
with self.assertRaises(SyntaxError):
450462
exec(
@@ -468,6 +480,7 @@ def bar():
468480
self.assertEqual(foo.__code__.co_cellvars, ())
469481
self.assertEqual(foo().__code__.co_freevars, ())
470482

483+
@unittest.expectedFailure # TODO: RUSTPYTHON; "f'{x=!r}'" != "f'x={x!r}'"
471484
def test_annotations_forbidden(self):
472485
with self.assertRaises(SyntaxError):
473486
self._exec_future("test: (yield)")

0 commit comments

Comments
 (0)