[Python-checkins] r83687 - in python/branches/release26-maint/Lib/test: regrtest.py test_dl.py

ezio.melotti python-checkins at python.org
Tue Aug 3 21:43:08 CEST 2010


Author: ezio.melotti
Date: Tue Aug  3 21:43:08 2010
New Revision: 83687

Log:
Run test_py3kwarn first to avoid failures with -3.

Modified:
   python/branches/release26-maint/Lib/test/regrtest.py
   python/branches/release26-maint/Lib/test/test_dl.py

Modified: python/branches/release26-maint/Lib/test/regrtest.py
==============================================================================
--- python/branches/release26-maint/Lib/test/regrtest.py	(original)
+++ python/branches/release26-maint/Lib/test/regrtest.py	Tue Aug  3 21:43:08 2010
@@ -483,6 +483,13 @@
     '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 = [

Modified: python/branches/release26-maint/Lib/test/test_dl.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_dl.py	(original)
+++ python/branches/release26-maint/Lib/test/test_dl.py	Tue Aug  3 21:43:08 2010
@@ -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'),


More information about the Python-checkins mailing list