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:
Victor Stinner 2011-11-15 22:27:41 +01:00
parent 6166519d2b
commit 1ab6c2d2c2
8 changed files with 264 additions and 169 deletions

View file

@ -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.