]> granicus.if.org Git - python/commitdiff
Fix buildbot failure in test_os.py
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 10:44:09 +0000 (10:44 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 10:44:09 +0000 (10:44 +0000)
Lib/test/test_dl.py
Lib/test/test_os.py

index c04bc1b530055276933684899bcd1a14114cb310..5c8188e93a6ec63a7f616355e2160263e962b246 100755 (executable)
@@ -3,7 +3,10 @@
    Roger E. Masse  revised strategy by Barry Warsaw
 """
 from test.test_support import verbose,TestSkipped, import_module
+import warnings
+warnings.simplefilter('always')
 dl = import_module('dl', deprecated=True)
+warnings.resetwarnings()
 
 sharedlibs = [
     ('/usr/lib/libc.so', 'getpid'),
index e54ab4b7729e511cd9bec3daa1a031e8c17846ce..db7e9b4105b65fbe9ce392127cc0a4c08758c511 100644 (file)
@@ -500,8 +500,7 @@ class DevNullTests (unittest.TestCase):
 class URandomTests (unittest.TestCase):
     def test_urandom(self):
         try:
-            with test_support._check_py3k_warnings(
-                ('integer argument expected, got float', DeprecationWarning)):
+            with test_support.check_warnings():
                 self.assertEqual(len(os.urandom(1)), 1)
                 self.assertEqual(len(os.urandom(10)), 10)
                 self.assertEqual(len(os.urandom(100)), 100)