summaryrefslogtreecommitdiff
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-07-17 10:50:30 +0200
committerHynek Schlawack <hs@ox.cx>2012-07-17 10:50:30 +0200
commite517b42e162c98a97b2d417f86d845ea4d571438 (patch)
treec24227c7e785df01545222094edce16210040f12 /Lib/test/test_posixpath.py
parentf2436300a9527c0587573cd0b5b2a79359f0e49d (diff)
parent71add9f8742df23e6038c1f0743cfc8032849a2a (diff)
downloadcpython-e517b42e162c98a97b2d417f86d845ea4d571438.tar.gz
Fix context manager use in posixpath.join() tests
The asserts were useless (and buggy).
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 1ec4a154d9..e89f22e6fc 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
@@ -241,7 +241,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.