summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2008-03-21 21:01:18 (GMT)
committerSteven Bethard <steven.bethard@gmail.com>2008-03-21 21:01:18 (GMT)
commitd290b04ee3645f8dd2e30c329c5ead2db16ece62 (patch)
treecd486773ecfeb21cc5784a269bd48bcb83da4394 /Lib
parentc326801ffc2657d11423a5c2e386c24fdd9731ff (diff)
downloadcpython-d290b04ee3645f8dd2e30c329c5ead2db16ece62.zip
cpython-d290b04ee3645f8dd2e30c329c5ead2db16ece62.tar.gz
cpython-d290b04ee3645f8dd2e30c329c5ead2db16ece62.tar.bz2
Replace hack in regrtest.py with use of sys.py3kwarning.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/regrtest.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index f8eac8c..5706813 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1164,13 +1164,8 @@ class _ExpectedSkips:
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