summaryrefslogtreecommitdiff
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-07-15 16:46:23 +0200
committerHynek Schlawack <hs@ox.cx>2012-07-15 16:46:23 +0200
commitb1fedb8674eba63037beb7bf3d70e963b914b2f4 (patch)
treea5676aa1ba74c6c9005975fafa57904c99eab04f /Lib/test/test_posixpath.py
parentb1f3849c9896473d84f675fb39ade6c97fb4de08 (diff)
parent3a67a0088184bdada808beae41c68096b9b566bf (diff)
downloadcpython-b1fedb8674eba63037beb7bf3d70e963b914b2f4.tar.gz
#15180: Clarify posixpath.join() error message when mixing str & bytes
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r--Lib/test/test_posixpath.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index 54de0cf516..575e407d43 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
@@ -238,7 +238,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.