# HG changeset patch # User jruigrok # Date 1250857560 0 # Node ID 8f50e65273e6fad360e266d8207cd96726269ed9 # Parent 2ce20477c392e9001e360eadf1dca91069a5e75d Adjust tests to match the data in CLDR: German doesn't use a . as thousands separator, but a non-breaking whitespace. diff --git a/babel/numbers.py b/babel/numbers.py --- a/babel/numbers.py +++ b/babel/numbers.py @@ -142,7 +142,7 @@ return format_decimal(number, locale=locale) def format_decimal(number, format=None, locale=LC_NUMERIC): - """Return the given decimal number formatted for a specific locale. + u"""Return the given decimal number formatted for a specific locale. >>> format_decimal(1.2345, locale='en_US') u'1.234' @@ -153,7 +153,7 @@ >>> format_decimal(1.2345, locale='sv_SE') u'1,234' >>> format_decimal(12345, locale='de') - u'12.345' + u'12\\xa0345' The appropriate thousands grouping and the decimal separator are used for each locale: @@ -181,7 +181,7 @@ >>> format_currency(1099.98, 'USD', locale='es_CO') u'US$\\xa01.099,98' >>> format_currency(1099.98, 'EUR', locale='de_DE') - u'1.099,98\\xa0\\u20ac' + u'1\\xa0099,98\\xa0\\u20ac' The pattern can also be specified explicitly: