[Python-checkins] r61565 - python/trunk/Lib/test/regrtest.py
steven.bethard
python-checkins at python.org
Tue Mar 18 22:30:14 CET 2008
Author: steven.bethard
Date: Tue Mar 18 22:30:13 2008
New Revision: 61565
Modified:
python/trunk/Lib/test/regrtest.py
Log:
Have regrtest skip test_py3kwarn when the -3 flag is missing.
Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py (original)
+++ python/trunk/Lib/test/regrtest.py Tue Mar 18 22:30:13 2008
@@ -1164,6 +1164,14 @@
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')
+
self.valid = True
def isvalid(self):
More information about the Python-checkins
mailing list