mirror of https://github.com/python/cpython.git
Replace hack in regrtest.py with use of sys.py3kwarning.
This commit is contained in:
parent
c326801ffc
commit
d290b04ee3
|
@ -1164,12 +1164,7 @@ def __init__(self):
|
||||||
self.expected.add('test_sunaudiodev')
|
self.expected.add('test_sunaudiodev')
|
||||||
self.expected.add('test_nis')
|
self.expected.add('test_nis')
|
||||||
|
|
||||||
# TODO: This is a hack to raise TestSkipped if -3 is not enabled.
|
if not sys.py3kwarning:
|
||||||
# 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.expected.add('test_py3kwarn')
|
||||||
|
|
||||||
self.valid = True
|
self.valid = True
|
||||||
|
|
Loading…
Reference in New Issue