mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Have regrtest skip test_py3kwarn when the -3 flag is missing.
This commit is contained in:
parent
8e6ec2ff02
commit
e8e22cf3c0
1 changed files with 8 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue