Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Remove expectedFailure for encoding tests now passing
Remove @unittest.expectedFailure decorators from:
- test_source_encoding: test_encoding_on_first_line, test_encoding_on_second_line, test_bom_conflict
- test_runpy: test_encoding
  • Loading branch information
youknowone committed Mar 3, 2026
commit 53ddc7ef48865007e0472e3946f5e7a87efa627f
3 changes: 0 additions & 3 deletions Lib/test/test_importlib/source/test_source_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ def test_default_encoding(self):
self.run_test(self.source_line.encode('utf-8'))

# [encoding first line]
@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: invalid utf-8 sequence of 1 bytes from index 17
def test_encoding_on_first_line(self):
encoding = 'Latin-1'
source = self.create_source(encoding)
self.run_test(source)

# [encoding second line]
@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: invalid utf-8 sequence of 1 bytes from index 34
def test_encoding_on_second_line(self):
source = b"#/usr/bin/python\n" + self.create_source('Latin-1')
self.run_test(source)
Expand All @@ -84,7 +82,6 @@ def test_bom_and_utf_8(self):
self.run_test(source)

# [BOM conflict]
@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: invalid utf-8 sequence of 1 bytes from index 20
def test_bom_conflict(self):
source = codecs.BOM_UTF8 + self.create_source('latin-1')
with self.assertRaises(SyntaxError):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_runpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ def test_main_recursion_error(self):
with infinite_recursion(25):
self.assertRaises(RecursionError, run_path, zip_name)

@unittest.expectedFailure # TODO: RUSTPYTHON; detect encoding comments in files
def test_encoding(self):
with temp_dir() as script_dir:
filename = os.path.join(script_dir, 'script.py')
Expand Down
Loading