def in_foreign_locale(func):
if sys.platform == '<STR_LIT:win32>':<EOL><INDENT>locales = ['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>locales = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL><DEDENT>def wrapper(*args, **kwargs):<EOL><INDENT>curloc = locale.getlocale(locale.LC_NUMERIC)<EOL>try:<EOL><INDENT>for loc in locales:<EOL><INDENT>try:<EOL><INDENT>locale.setlocale(locale.LC_NUMERIC, loc)<EOL>break<EOL><DEDENT>except locale.Error:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise nose.SkipTest("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>return func(*args, **kwargs)<EOL><DEDENT>finally:<EOL><INDENT>locale.setlocale(locale.LC_NUMERIC, locale=curloc)<EOL><DEDENT><DEDENT>return nose.tools.make_decorator(func)(wrapper)<EOL>
Swap LC_NUMERIC locale to one in which the decimal point is ',' and not '.'
If not possible, raise nose.SkipTest