]> granicus.if.org Git - python/commitdiff
Improved test for a deprecation warning.
authorEric Smith <eric@trueblade.com>
Sat, 31 Oct 2009 17:07:17 +0000 (17:07 +0000)
committerEric Smith <eric@trueblade.com>
Sat, 31 Oct 2009 17:07:17 +0000 (17:07 +0000)
Lib/test/test_ascii_formatd.py

index 350195535319f2254c6d5668ea0a65567b88429d..5ee84fa6dfeb68cd3ad6e0acc74ce09d4434b641 100644 (file)
@@ -21,8 +21,7 @@ class FormatDeprecationTests(unittest.TestCase):
                                c_double(10.0))
             self.assertEqual(buf.value, '+10.0000000000')
 
-        self.assertEqual(str(w.message), 'PyOS_ascii_formatd is deprecated, '
-                         'use PyOS_double_to_string instead')
+        self.assertEqual(w.category, DeprecationWarning)
 
 class FormatTests(unittest.TestCase):
     # ensure that, for the restricted set of format codes,