mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #13374: The Windows bytes API has been deprecated in the os module. Use
Unicode filenames instead of bytes filenames to not depend on the ANSI code page anymore and to support any filename.
This commit is contained in:
parent
6166519d2b
commit
1ab6c2d2c2
8 changed files with 264 additions and 169 deletions
|
@ -1,10 +1,10 @@
|
|||
import unittest
|
||||
from test import support, test_genericpath
|
||||
|
||||
import posixpath
|
||||
import os
|
||||
import posixpath
|
||||
import sys
|
||||
import unittest
|
||||
import warnings
|
||||
from posixpath import realpath, abspath, dirname, basename
|
||||
from test import support, test_genericpath
|
||||
|
||||
try:
|
||||
import posix
|
||||
|
@ -231,7 +231,9 @@ class PosixPathTest(unittest.TestCase):
|
|||
|
||||
def test_ismount(self):
|
||||
self.assertIs(posixpath.ismount("/"), True)
|
||||
self.assertIs(posixpath.ismount(b"/"), True)
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
self.assertIs(posixpath.ismount(b"/"), True)
|
||||
|
||||
def test_ismount_non_existent(self):
|
||||
# Non-existent mountpoint.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue