forked from Rust-related/RustPython
add TODOs
This commit is contained in:
15
Lib/test/test_print.py
vendored
15
Lib/test/test_print.py
vendored
@@ -135,6 +135,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
if print statement is executed as in Python 2.
|
||||
"""
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_normal_string(self):
|
||||
python2_print_str = 'print "Hello World"'
|
||||
with self.assertRaises(SyntaxError) as context:
|
||||
@@ -143,6 +145,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
|
||||
str(context.exception))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_string_with_soft_space(self):
|
||||
python2_print_str = 'print "Hello World",'
|
||||
with self.assertRaises(SyntaxError) as context:
|
||||
@@ -151,6 +155,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
|
||||
str(context.exception))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_string_with_excessive_whitespace(self):
|
||||
python2_print_str = 'print "Hello World", '
|
||||
with self.assertRaises(SyntaxError) as context:
|
||||
@@ -159,6 +165,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
|
||||
str(context.exception))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_string_with_leading_whitespace(self):
|
||||
python2_print_str = '''if 1:
|
||||
print "Hello World"
|
||||
@@ -172,6 +180,9 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
# bpo-32685: Suggestions for print statement should be proper when
|
||||
# it is in the same line as the header of a compound statement
|
||||
# and/or followed by a semicolon
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_string_with_semicolon(self):
|
||||
python2_print_str = 'print p;'
|
||||
with self.assertRaises(SyntaxError) as context:
|
||||
@@ -180,6 +191,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
|
||||
str(context.exception))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_string_in_loop_on_same_line(self):
|
||||
python2_print_str = 'for i in s: print i'
|
||||
with self.assertRaises(SyntaxError) as context:
|
||||
@@ -188,6 +201,8 @@ class TestPy2MigrationHint(unittest.TestCase):
|
||||
self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
|
||||
str(context.exception))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_stream_redirection_hint_for_py2_migration(self):
|
||||
# Test correct hint produced for Py2 redirection syntax
|
||||
with self.assertRaises(TypeError) as context:
|
||||
|
||||
Reference in New Issue
Block a user