cpython: 00991aa5fdb5 (original) (raw)

Mercurial > cpython

changeset 101698:00991aa5fdb5

issue27182: update fsencode and fsdecode for os.path(); patch by Dusty Phillips [#27182]

Ethan Furman ethan@stoneleaf.us
date Sat, 04 Jun 2016 10:19:27 -0700
parents 7fda2d76d947
children 416441e4afab
files Lib/os.py Lib/test/test_os.py
diffstat 2 files changed, 29 insertions(+), 8 deletions(-)[+] [-] Lib/os.py 22 Lib/test/test_os.py 15

line wrap: on

line diff

--- a/Lib/os.py +++ b/Lib/os.py @@ -877,29 +877,35 @@ def _fscodec(): def fsencode(filename): """

def fsdecode(filename): """

return fsencode, fsdecode

--- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3106,6 +3106,21 @@ class TestPEP519(unittest.TestCase): for s in 'hello', 'goodbye', 'some/path/and/file': self.assertEqual(s, os.fspath(s))

+

+

+

+ def test_garbage_in_exception_out(self): vapor = type('blah', (), {}) for o in int, type, os, vapor():