Merge pull request #3322 from deantvv/io-error-builder-doc

update doc for IOErrorBuilder
This commit is contained in:
Jim Fasarakis-Hilliard
2021-10-16 19:08:23 +03:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

2
Lib/test/test_os.py vendored
View File

@@ -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' : <built-in function chdir>)
@unittest.expectedFailure
def test_oserror_filename(self):
funcs = [

View File

@@ -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<PathOrFd>,