Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
test.test_locale.TestFrFRNumberFormatting Class Reference
Inheritance diagram for test.test_locale.TestFrFRNumberFormatting:
Inheritance graph
[legend]
Collaboration diagram for test.test_locale.TestFrFRNumberFormatting:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_decimal_point
def test_grouping
def test_grouping_and_padding
def test_integer_grouping
def test_integer_grouping_and_padding
def test_currency
def setUp
def tearDown

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Public Attributes

dictionary cooked_values

Detailed Description

Definition at line 295 of file test_locale.py.


Member Function Documentation

def test.test_locale.BaseCookedTest.setUp (   self) [inherited]

Reimplemented in test.test_locale.TestEnUSNumberFormatting.

Definition at line 58 of file test_locale.py.

00058 
00059     def setUp(self):
00060         locale._override_localeconv = self.cooked_values

Here is the caller graph for this function:

def test.test_locale.BaseCookedTest.tearDown (   self) [inherited]

Definition at line 61 of file test_locale.py.

00061 
00062     def tearDown(self):
00063         locale._override_localeconv = {}

Here is the caller graph for this function:

Definition at line 329 of file test_locale.py.

00329 
00330     def test_currency(self):
00331         euro = '\u20ac'
00332         self._test_currency(50000, "50000,00 " + euro)
00333         self._test_currency(50000, "50 000,00 " + euro, grouping=True)
00334         # XXX is the trailing space a bug?
00335         self._test_currency(50000, "50 000,00 EUR ",
00336             grouping=True, international=True)
00337 

Here is the call graph for this function:

Definition at line 298 of file test_locale.py.

00298 
00299     def test_decimal_point(self):
00300         self._test_format("%.2f", 12345.67, out='12345,67')

Here is the call graph for this function:

Definition at line 301 of file test_locale.py.

00301 
00302     def test_grouping(self):
00303         self._test_format("%.2f", 345.67, grouping=True, out='345,67')
00304         self._test_format("%.2f", 12345.67, grouping=True, out='12 345,67')

Here is the call graph for this function:

Definition at line 305 of file test_locale.py.

00305 
00306     def test_grouping_and_padding(self):
00307         self._test_format("%6.2f", 345.67, grouping=True, out='345,67')
00308         self._test_format("%7.2f", 345.67, grouping=True, out=' 345,67')
00309         self._test_format("%8.2f", 12345.67, grouping=True, out='12 345,67')
00310         self._test_format("%9.2f", 12345.67, grouping=True, out='12 345,67')
00311         self._test_format("%10.2f", 12345.67, grouping=True, out=' 12 345,67')
00312         self._test_format("%-6.2f", 345.67, grouping=True, out='345,67')
00313         self._test_format("%-7.2f", 345.67, grouping=True, out='345,67 ')
00314         self._test_format("%-8.2f", 12345.67, grouping=True, out='12 345,67')
00315         self._test_format("%-9.2f", 12345.67, grouping=True, out='12 345,67')
00316         self._test_format("%-10.2f", 12345.67, grouping=True, out='12 345,67 ')

Here is the call graph for this function:

Definition at line 317 of file test_locale.py.

00317 
00318     def test_integer_grouping(self):
00319         self._test_format("%d", 200, grouping=True, out='200')
00320         self._test_format("%d", 4200, grouping=True, out='4 200')

Here is the call graph for this function:

Definition at line 321 of file test_locale.py.

00321 
00322     def test_integer_grouping_and_padding(self):
00323         self._test_format("%4d", 4200, grouping=True, out='4 200')
00324         self._test_format("%5d", 4200, grouping=True, out='4 200')
00325         self._test_format("%10d", 4200, grouping=True, out='4 200'.rjust(10))
00326         self._test_format("%-4d", 4200, grouping=True, out='4 200')
00327         self._test_format("%-5d", 4200, grouping=True, out='4 200')
00328         self._test_format("%-10d", 4200, grouping=True, out='4 200'.ljust(10))

Here is the call graph for this function:


Member Data Documentation

Initial value:
{
        'currency_symbol': '\u20ac',
        'decimal_point': ',',
        'frac_digits': 2,
        'grouping': [3, 3, 0],
        'int_curr_symbol': 'EUR ',
        'int_frac_digits': 2,
        'mon_decimal_point': ',',
        'mon_grouping': [3, 3, 0],
        'mon_thousands_sep': ' ',
        'n_cs_precedes': 0,
        'n_sep_by_space': 1,
        'n_sign_posn': 1,
        'negative_sign': '-',
        'p_cs_precedes': 0,
        'p_sep_by_space': 1,
        'p_sign_posn': 1,
        'positive_sign': '',
        'thousands_sep': ' '
    }

Definition at line 117 of file test_locale.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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