Back to index

python3.2  3.2.2
Public Member Functions
test.test_locale.TestLocaleFormatString Class Reference

List of all members.

Public Member Functions

def test_percent_escape
def test_mapping

Detailed Description

General tests on locale.format_string

Definition at line 243 of file test_locale.py.


Member Function Documentation

Definition at line 253 of file test_locale.py.

00253 
00254     def test_mapping(self):
00255         self.assertEqual(locale.format_string('%(foo)s bing.', {'foo': 'bar'}),
00256             ('%(foo)s bing.' % {'foo': 'bar'}))
00257         self.assertEqual(locale.format_string('%(foo)s', {'foo': 'bar'}),
00258             ('%(foo)s' % {'foo': 'bar'}))
00259 
00260 

Here is the call graph for this function:

Definition at line 246 of file test_locale.py.

00246 
00247     def test_percent_escape(self):
00248         self.assertEqual(locale.format_string('%f%%', 1.0), '%f%%' % 1.0)
00249         self.assertEqual(locale.format_string('%d %f%%d', (1, 1.0)),
00250             '%d %f%%d' % (1, 1.0))
00251         self.assertEqual(locale.format_string('%(foo)s %%d', {'foo': 'bar'}),
00252             ('%(foo)s %%d' % {'foo': 'bar'}))

Here is the call graph for this function:


The documentation for this class was generated from the following file: