From: Eric Smith Date: Sat, 31 Oct 2009 17:07:17 +0000 (+0000) Subject: Improved test for a deprecation warning. X-Git-Tag: v2.7a1~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b9e3a5423090ba2ce309ba629eb042d2932087d;p=python Improved test for a deprecation warning. --- diff --git a/Lib/test/test_ascii_formatd.py b/Lib/test/test_ascii_formatd.py index 3501955353..5ee84fa6df 100644 --- a/Lib/test/test_ascii_formatd.py +++ b/Lib/test/test_ascii_formatd.py @@ -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,