diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-13 18:06:42 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-13 18:06:42 -0400 |
commit | c2c9c905706160bf34aea12f2348210aac3e0da2 (patch) | |
tree | 9f7cc31fdab50fc9e80c1c9fd379e0b12414242a /Lib/test/test_ntpath.py | |
parent | e307451be16e5bf59b38ec5aea76f68c0831fb65 (diff) | |
parent | 77795fd1f148a037c9ab583968d85bfc009bc15c (diff) | |
download | cpython-c2c9c905706160bf34aea12f2348210aac3e0da2.tar.gz |
merge 3.2
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r-- | Lib/test/test_ntpath.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 6464950982..2c9dab9bb0 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): |