diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-07-17 10:50:30 +0200 |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-07-17 10:50:30 +0200 |
commit | e517b42e162c98a97b2d417f86d845ea4d571438 (patch) | |
tree | c24227c7e785df01545222094edce16210040f12 /Lib/test/test_posixpath.py | |
parent | f2436300a9527c0587573cd0b5b2a79359f0e49d (diff) | |
parent | 71add9f8742df23e6038c1f0743cfc8032849a2a (diff) | |
download | cpython-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.py | 12 |
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. |