mirror of
https://github.com/python/cpython.git
synced 2025-11-04 15:41:43 +00:00
Issue #7849: Now the utility `check_warnings` verifies if the warnings are
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
This commit is contained in:
parent
1f3b4e12e8
commit
6de9e938a5
8 changed files with 102 additions and 27 deletions
|
|
@ -279,16 +279,14 @@ def __getslice__(self, i, j):
|
|||
|
||||
def test_getitem(self):
|
||||
self._getitem_helper(object)
|
||||
# Silence Py3k warning
|
||||
with test_support.check_warnings():
|
||||
with test_support.check_py3k_warnings():
|
||||
self._getslice_helper_deprecated(object)
|
||||
|
||||
def test_getitem_classic(self):
|
||||
class Empty: pass
|
||||
# XXX This test fails (see bug #7532)
|
||||
#self._getitem_helper(Empty)
|
||||
# Silence Py3k warning
|
||||
with test_support.check_warnings():
|
||||
with test_support.check_py3k_warnings():
|
||||
self._getslice_helper_deprecated(Empty)
|
||||
|
||||
def test_sequence_repeat(self):
|
||||
|
|
@ -308,8 +306,7 @@ def test_main():
|
|||
XRangeTestCase,
|
||||
OverflowTestCase,
|
||||
)
|
||||
# Silence Py3k warning
|
||||
with test_support.check_warnings():
|
||||
with test_support.check_py3k_warnings():
|
||||
test_support.run_unittest(
|
||||
ClassicSeqDeprecatedTestCase,
|
||||
NewSeqDeprecatedTestCase,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue