(self)
| 234 | """General tests on locale.format_string""" |
| 235 | |
| 236 | def test_percent_escape(self): |
| 237 | self.assertEqual(locale.format_string('%f%%', 1.0), '%f%%' % 1.0) |
| 238 | self.assertEqual(locale.format_string('%d %f%%d', (1, 1.0)), |
| 239 | '%d %f%%d' % (1, 1.0)) |
| 240 | self.assertEqual(locale.format_string('%(foo)s %%d', {'foo': 'bar'}), |
| 241 | ('%(foo)s %%d' % {'foo': 'bar'})) |
| 242 | |
| 243 | def test_mapping(self): |
| 244 | self.assertEqual(locale.format_string('%(foo)s bing.', {'foo': 'bar'}), |
nothing calls this directly
no test coverage detected