[Python-checkins] r61720 - python/trunk/Lib/test/regrtest.py

steven.bethard python-checkins at python.org
Fri Mar 21 22:01:18 CET 2008


Author: steven.bethard
Date: Fri Mar 21 22:01:18 2008
New Revision: 61720

Modified:
   python/trunk/Lib/test/regrtest.py
Log:
Replace hack in regrtest.py with use of sys.py3kwarning.

Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Fri Mar 21 22:01:18 2008
@@ -1164,13 +1164,8 @@
                 self.expected.add('test_sunaudiodev')
                 self.expected.add('test_nis')
 
-            # TODO: This is a hack to raise TestSkipped if -3 is not enabled.
-            # Instead of relying on callable to have a warning, we should expose
-            # the -3 flag to Python code somehow
-            with test_support.catch_warning() as w:
-                callable(int)
-                if w.message is None:
-                    self.expected.add('test_py3kwarn')
+            if not sys.py3kwarning:
+                self.expected.add('test_py3kwarn')
 
             self.valid = True
 


More information about the Python-checkins mailing list