Commit da6b1077 authored by Georg Brandl's avatar Georg Brandl

Checkin the test of patch #1400181.

parent 89f35ac1
......@@ -411,6 +411,20 @@ class UnicodeTest(
return u'\u1234'
self.assertEqual('%s' % Wrapper(), u'\u1234')
def test_format_float(self):
try:
import locale
orig_locale = locale.setlocale(locale.LC_ALL)
locale.setlocale(locale.LC_ALL, 'de_DE')
except (ImportError, locale.Error):
return # skip if we can't set locale
try:
# should not format with a comma, but always with C locale
self.assertEqual(u'1.0', u'%.1f' % 1.0)
finally:
locale.setlocale(locale.LC_ALL, orig_locale)
def test_constructor(self):
# unicode(obj) tests (this maps to PyObject_Unicode() at C level)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment