[Python-checkins] r79153 - python/branches/py3k/Lib/test/test_posix.py
brett.cannon
python-checkins at python.org
Sat Mar 20 22:53:28 CET 2010
Author: brett.cannon
Date: Sat Mar 20 22:53:28 2010
New Revision: 79153
Log:
Fix the warnings usage in test_posix.
Modified:
python/branches/py3k/Lib/test/test_posix.py
Modified: python/branches/py3k/Lib/test/test_posix.py
==============================================================================
--- python/branches/py3k/Lib/test/test_posix.py (original)
+++ python/branches/py3k/Lib/test/test_posix.py Sat Mar 20 22:53:28 2010
@@ -13,8 +13,6 @@
import unittest
import warnings
-warnings.filterwarnings('ignore', '.* potential security risk .*',
- RuntimeWarning)
class PosixTester(unittest.TestCase):
@@ -22,9 +20,14 @@
# create empty file
fp = open(support.TESTFN, 'w+')
fp.close()
+ self._warnings_manager = support.check_warnings()
+ self._warnings_manager.__enter__()
+ warnings.filterwarnings('ignore', '.* potential security risk .*',
+ RuntimeWarning)
def tearDown(self):
support.unlink(support.TESTFN)
+ self._warnings_manager.__exit__(None, None, None)
def testNoArgFunctions(self):
# test posix functions which take no arguments and have
More information about the Python-checkins
mailing list