diff options
author | Brett Cannon <brett@python.org> | 2016-06-24 19:03:43 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-06-24 19:03:43 (GMT) |
commit | c78ca1e044b7ca4c1764bb3670196e72351d4467 (patch) | |
tree | 3435d7babe85991192e645d12c9ec2b24b4de04f /Lib/test/test_io.py | |
parent | 19b2a53a82c8f4d179efdc39fb39f766191cac2b (diff) | |
download | cpython-c78ca1e044b7ca4c1764bb3670196e72351d4467.zip cpython-c78ca1e044b7ca4c1764bb3670196e72351d4467.tar.gz cpython-c78ca1e044b7ca4c1764bb3670196e72351d4467.tar.bz2 |
Issue #27186: Update os.fspath()/PyOS_FSPath() to check the return
type of __fspath__().
As part of this change, also make sure that the pure Python
implementation of os.fspath() is tested.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 8581865..0bfaba9 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -879,7 +879,7 @@ class IOTest(unittest.TestCase): check_path_succeeds(PathLike(support.TESTFN.encode('utf-8'))) bad_path = PathLike(TypeError) - with self.assertRaisesRegex(TypeError, 'invalid file'): + with self.assertRaises(TypeError): self.open(bad_path, 'w') # ensure that refcounting is correct with some error conditions |