]> granicus.if.org Git - python/commitdiff
Run test_py3kwarn first to avoid failures with -3.
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 19:43:08 +0000 (19:43 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 19:43:08 +0000 (19:43 +0000)
Lib/test/regrtest.py
Lib/test/test_dl.py

index 2177b66e1a8cef183237c51d1df51cbb8d105ef3..920d545c5d54fcf8c5cd93c94461ff2416dbc866 100755 (executable)
@@ -483,6 +483,13 @@ STDTESTS = [
     'test_unittest',
     'test_doctest',
     'test_doctest2',
+    # On 2.6, when a C module like dl or linuxaudiodev is imported by some
+    # test, a DeprecationWarning is raised, but test_py3kwarn can not find
+    # it in the __warningregistry__ of the modules in sys.modules.
+    # C modules raise the warning only once, and since there's no way to
+    # find these warnings, test_py3kwarn is executed first to catch them
+    # before the other modules.  This shouldn't affect 2.7+
+    'test_py3kwarn',
    ]
 
 NOTTESTS = [
index 5c8188e93a6ec63a7f616355e2160263e962b246..c04bc1b530055276933684899bcd1a14114cb310 100755 (executable)
@@ -3,10 +3,7 @@
    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'),