diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-15 21:27:41 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-15 21:27:41 (GMT) |
commit | 1ab6c2d2c2b6c78e492491542007edfb880889f0 (patch) | |
tree | 2933764c675aa8f715a176c7ae0cb8486bdd0f0a /Lib/test/test_posixpath.py | |
parent | 6166519d2bfb0b6fd7ff304da89c59b10557d4a3 (diff) | |
download | cpython-1ab6c2d2c2b6c78e492491542007edfb880889f0.zip cpython-1ab6c2d2c2b6c78e492491542007edfb880889f0.tar.gz cpython-1ab6c2d2c2b6c78e492491542007edfb880889f0.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index bb4559c..709ef04 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -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. |