diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2008-03-18 21:30:13 (GMT) |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2008-03-18 21:30:13 (GMT) |
commit | e8e22cf3c0d9e977bc9f13cfc535c026f92bc7aa (patch) | |
tree | caeae1beff0dc3b400001241d85eb459c0575c37 /Lib | |
parent | 8e6ec2ff026e2a6cf810094633e530baee21d95a (diff) | |
download | cpython-e8e22cf3c0d9e977bc9f13cfc535c026f92bc7aa.zip cpython-e8e22cf3c0d9e977bc9f13cfc535c026f92bc7aa.tar.gz cpython-e8e22cf3c0d9e977bc9f13cfc535c026f92bc7aa.tar.bz2 |
Have regrtest skip test_py3kwarn when the -3 flag is missing.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/regrtest.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 16f23f3..f8eac8c 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1164,6 +1164,14 @@ 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') + self.valid = True def isvalid(self): |