MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_percent_escape

Method test_percent_escape

Lib/test/test_locale.py:236–241  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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'}),

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
format_stringMethod · 0.45

Tested by

no test coverage detected