This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akira
Recipients akira
Date 2011-11-22.00:42:35
SpamBayes Score 9.353776e-08
Marked as misclassified No
Message-id <1321922556.51.0.541780569618.issue13450@psf.upfronthosting.co.za>
In-reply-to
Content
It seems that some assertions in Lib/test/test_unicode.py:UnicodeTest.test_format_map do not implement their intent e.g.,

        self.assertRaises(TypeError, '{'.format_map)
        self.assertRaises(TypeError, '}'.format_map)
        self.assertRaises(TypeError, 'a{'.format_map)
        self.assertRaises(TypeError, 'a}'.format_map)
        self.assertRaises(TypeError, '{a'.format_map)
        self.assertRaises(TypeError, '}a'.format_map)

The intent might be to test:

  >>> '{'.format_map({})
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  ValueError: Single '{' encountered in format string

But it actually tests:

  >>> '{'.format_map()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: format_map() takes exactly one argument (0 given)

Provided correct-assertions-in-test_format_map.patch contains additional assertions e.g.,

      self.assertRaises(ValueError, '{'.format_map, {})

Old assertions might be useful so they're left untouched.
History
Date User Action Args
2011-11-22 00:42:36akirasetrecipients: + akira
2011-11-22 00:42:36akirasetmessageid: <1321922556.51.0.541780569618.issue13450@psf.upfronthosting.co.za>
2011-11-22 00:42:35akiralinkissue13450 messages
2011-11-22 00:42:35akiracreate