summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-11-15 21:27:43 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-11-15 21:27:43 (GMT)
commit8ab440e4771c4118e874cbb05b5f8f09a4408f49 (patch)
tree889e37790b5d834a14a3b58cfb8f4c3e6fbc88eb /Lib/test/test_ntpath.py
parent8ad982cccf439419937bf2acf111f7ee197c4181 (diff)
parent1ab6c2d2c2b6c78e492491542007edfb880889f0 (diff)
downloadcpython-8ab440e4771c4118e874cbb05b5f8f09a4408f49.zip
cpython-8ab440e4771c4118e874cbb05b5f8f09a4408f49.tar.gz
cpython-8ab440e4771c4118e874cbb05b5f8f09a4408f49.tar.bz2
Merge
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 6464950..2c9dab9 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -1,10 +1,11 @@
import ntpath
import os
import sys
+import unittest
+import warnings
from test.support import TestFailed
from test import support, test_genericpath
from tempfile import TemporaryFile
-import unittest
def tester(fn, wantResult):
@@ -21,7 +22,9 @@ def tester(fn, wantResult):
fn = fn.replace('["', '[b"')
fn = fn.replace(", '", ", b'")
fn = fn.replace(', "', ', b"')
- gotResult = eval(fn)
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ gotResult = eval(fn)
if isinstance(wantResult, str):
wantResult = wantResult.encode('ascii')
elif isinstance(wantResult, tuple):