mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Cleanup some test cases using check_warnings and check_py3k_warnings.
This commit is contained in:
parent
2b73c21bed
commit
945a8ba635
6 changed files with 53 additions and 79 deletions
|
|
@ -17,7 +17,7 @@ class FormatDeprecationTests(unittest.TestCase):
|
|||
PyOS_ascii_formatd = pythonapi.PyOS_ascii_formatd
|
||||
buf = create_string_buffer(' ' * 100)
|
||||
|
||||
with check_warnings():
|
||||
with check_warnings(quiet=False):
|
||||
PyOS_ascii_formatd(byref(buf), sizeof(buf), '%+.10f',
|
||||
c_double(10.0))
|
||||
self.assertEqual(buf.value, '+10.0000000000')
|
||||
|
|
@ -46,7 +46,7 @@ class FormatTests(unittest.TestCase):
|
|||
('%-e', 1.234),
|
||||
]
|
||||
|
||||
with check_warnings():
|
||||
with check_warnings(quiet=False):
|
||||
for format, val in tests:
|
||||
PyOS_ascii_formatd(byref(buf), sizeof(buf), format,
|
||||
c_double(val))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue