Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated code.py library
  • Loading branch information
terryluan12 authored and youknowone committed Dec 30, 2025
commit b4f234155ed8f22c4041b75cba902d865bf1b4d4
5 changes: 5 additions & 0 deletions Lib/test/test_code_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def test_console_stderr(self):
raise AssertionError("no console stdout")

# TODO: RUSTPYTHON
# AssertionError: Lists differ: [' F[27 chars] x = ?', ' ^', 'SyntaxError: got unexpected token ?'] != [' F[27 chars] x = ?', ' ^', 'SyntaxError: invalid syntax']
@unittest.expectedFailure
def test_syntax_error(self):
self.infunc.side_effect = ["def f():",
Expand All @@ -86,6 +87,7 @@ def test_syntax_error(self):
self.assertIs(self.sysmod.last_exc, self.sysmod.last_value)

# TODO: RUSTPYTHON
# AssertionError: Lists differ: [' F[15 chars], line 1', ' 1', 'IndentationError: unexpected indentation'] != [' F[15 chars], line 1', ' 1', 'IndentationError: unexpected indent']
@unittest.expectedFailure
def test_indentation_error(self):
self.infunc.side_effect = [" 1", EOFError('Finished')]
Expand All @@ -104,6 +106,7 @@ def test_indentation_error(self):
self.assertIs(self.sysmod.last_exc, self.sysmod.last_value)

# TODO: RUSTPYTHON
# AssertionError: False is not true : UnicodeDecodeError: invalid utf-8 sequence of 1 bytes from index 1
@unittest.expectedFailure
def test_unicode_error(self):
self.infunc.side_effect = ["'\ud800'", EOFError('Finished')]
Expand Down Expand Up @@ -142,6 +145,7 @@ def test_sysexcepthook(self):
'ValueError: BOOM!\n'])

# TODO: RUSTPYTHON
# AssertionError: Lists differ: [' F[35 chars]= ?\n', ' ^\n', 'SyntaxError: got unexpected token ?\n'] != [' F[35 chars]= ?\n', ' ^\n', 'SyntaxError: invalid syntax\n']
@unittest.expectedFailure
def test_sysexcepthook_syntax_error(self):
self.infunc.side_effect = ["def f():",
Expand All @@ -167,6 +171,7 @@ def test_sysexcepthook_syntax_error(self):
'SyntaxError: invalid syntax\n'])

# TODO: RUSTPYTHON
# AssertionError: Lists differ: [' F[21 chars] 1\n', ' 1\n', 'IndentationError: unexpected indentation\n'] != [' F[21 chars] 1\n', ' 1\n', 'IndentationError: unexpected indent\n']
@unittest.expectedFailure
def test_sysexcepthook_indentation_error(self):
self.infunc.side_effect = [" 1", EOFError('Finished')]
Expand Down