diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 0bb0c89f92..9e580b570a 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3435,7 +3435,7 @@ class OSErrorTests(unittest.TestCase): self.filenames = self.bytes_filenames + self.unicode_filenames - # TODO: RUSTPYTHON (AttributeError: 'FileNotFoundError' object has no attribute 'filename') + # TODO: RUSTPYTHON (AssertionError: b'@test_22106_tmp\xe7w\xf0' is not b'@test_22106_tmp\xe7w\xf0' : ) @unittest.expectedFailure def test_oserror_filename(self): funcs = [ diff --git a/vm/src/stdlib/os.rs b/vm/src/stdlib/os.rs index ae956230fa..82bd69873f 100644 --- a/vm/src/stdlib/os.rs +++ b/vm/src/stdlib/os.rs @@ -265,6 +265,8 @@ impl IntoPyException for nix::Error { io::Error::from(self).into_pyexception(vm) } } + +// TODO: preserve the input `PyObjectRef` of filename and filename2 (Failing check `self.assertIs(err.filename, name, str(func)`) pub struct IOErrorBuilder { error: io::Error, filename: Option,