summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-08-26 21:44:48 (GMT)
committerBrett Cannon <brett@python.org>2016-08-26 21:44:48 (GMT)
commit3f9183b5aca568867f37c38501fca63911580c66 (patch)
tree77dbe8fa7c0381c665ed259a94620a860a8f73d7 /Lib/test/test_posix.py
parent6ed442c48dd7f8d3097e688a36bc027df3271621 (diff)
downloadcpython-3f9183b5aca568867f37c38501fca63911580c66.zip
cpython-3f9183b5aca568867f37c38501fca63911580c66.tar.gz
cpython-3f9183b5aca568867f37c38501fca63911580c66.tar.bz2
Issue #26027, #27524: Add PEP 519/__fspath__() support to os and
os.path. Thanks to Jelle Zijlstra for the initial patch against posixmodule.c.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index de22513..d2f58ba 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -397,7 +397,7 @@ class PosixTester(unittest.TestCase):
self.assertTrue(posix.stat(fp.fileno()))
self.assertRaisesRegex(TypeError,
- 'should be string, bytes or integer, not',
+ 'should be string, bytes, os.PathLike or integer, not',
posix.stat, float(fp.fileno()))
finally:
fp.close()
@@ -409,16 +409,16 @@ class PosixTester(unittest.TestCase):
self.assertTrue(posix.stat(os.fsencode(support.TESTFN)))
self.assertWarnsRegex(DeprecationWarning,
- 'should be string, bytes or integer, not',
+ 'should be string, bytes, os.PathLike or integer, not',
posix.stat, bytearray(os.fsencode(support.TESTFN)))
self.assertRaisesRegex(TypeError,
- 'should be string, bytes or integer, not',
+ 'should be string, bytes, os.PathLike or integer, not',
posix.stat, None)
self.assertRaisesRegex(TypeError,
- 'should be string, bytes or integer, not',
+ 'should be string, bytes, os.PathLike or integer, not',
posix.stat, list(support.TESTFN))
self.assertRaisesRegex(TypeError,
- 'should be string, bytes or integer, not',
+ 'should be string, bytes, os.PathLike or integer, not',
posix.stat, list(os.fsencode(support.TESTFN)))
@unittest.skipUnless(hasattr(posix, 'mkfifo'), "don't have mkfifo()")