summaryrefslogtreecommitdiff
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-01 21:00:05 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-01 21:00:05 +0200
commit91651b3746a6a5e0432ba716815e0bd6979340dd (patch)
tree154947080db65bead4f0d87acad0e2059347e010 /Lib/test/test_posixpath.py
parent3a70c0df5030ea8ed232daff53d9dac17dc5d47f (diff)
parent8a7c195add0c2b81620067072762554ac98ae9fb (diff)
downloadcpython-91651b3746a6a5e0432ba716815e0bd6979340dd.tar.gz
#17315: merge with 3.2.
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r--Lib/test/test_posixpath.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index 262e09dfdb..724c530261 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -1,11 +1,11 @@
-import unittest
-from test import support, test_genericpath
-
import itertools
-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
@@ -245,7 +245,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.
@@ -598,14 +600,10 @@ class PosixPathTest(unittest.TestCase):
self.assertTrue(posixpath.sameopenfile(a.fileno(), b.fileno()))
-class PosixCommonTest(test_genericpath.CommonTest):
+class PosixCommonTest(test_genericpath.CommonTest, unittest.TestCase):
pathmodule = posixpath
attributes = ['relpath', 'samefile', 'sameopenfile', 'samestat']
-def test_main():
- support.run_unittest(PosixPathTest, PosixCommonTest)
-
-
if __name__=="__main__":
- test_main()
+ unittest.main()