diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:18:33 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:18:33 (GMT) |
commit | 6de9e938a5f70128a77c589b3ec40936f6335c1c (patch) | |
tree | c92fde2ad98ab954b494c59b1554da17f3720ccd /Lib/test/test_ascii_formatd.py | |
parent | 1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 (diff) | |
download | cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.zip cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.tar.gz cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.tar.bz2 |
Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
Diffstat (limited to 'Lib/test/test_ascii_formatd.py')
-rw-r--r-- | Lib/test/test_ascii_formatd.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_ascii_formatd.py b/Lib/test/test_ascii_formatd.py index 77759fe..50e7340 100644 --- a/Lib/test/test_ascii_formatd.py +++ b/Lib/test/test_ascii_formatd.py @@ -17,14 +17,11 @@ class FormatDeprecationTests(unittest.TestCase): PyOS_ascii_formatd = pythonapi.PyOS_ascii_formatd buf = create_string_buffer(' ' * 100) - with check_warnings() as w: - warnings.simplefilter('default') + with check_warnings(): PyOS_ascii_formatd(byref(buf), sizeof(buf), '%+.10f', c_double(10.0)) self.assertEqual(buf.value, '+10.0000000000') - self.assertEqual(w.category, DeprecationWarning) - class FormatTests(unittest.TestCase): # ensure that, for the restricted set of format codes, # %-formatting returns the same values os PyOS_ascii_formatd |