bgHdZddlZddlZddlZdgZdZGddZdS)z,Provide class for testing in French locale NCommaDecimalPointLocalectjdkrdg}ngd}tjtj}d} |D]:} tjtj||}n#tj$rY7wxYwtjtj|n%#tjtj|wxYw||fS)a:See if platform has a decimal point as comma locale. Find a locale that uses a comma instead of a period as the decimal point. Returns ------- old_locale: str Locale when the function was called. new_locale: {str, None) First French locale found, None if none found. win32FRENCH)fr_FRz fr_FR.UTF-8fi_FIz fi_FI.UTF-8Nlocale)sysplatformr getlocale LC_NUMERIC setlocaleError)locales old_locale new_localelocs l/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/numpy/core/tests/_locales.pyfind_comma_decimal_point_localer s |w*BBB!&"344JJ ?  C  !2C888 <     *:>>>>>*:>>>>> z !!s.B!A" B"A41B3A44B"B:cDeZdZdZe\ZZdZdZdZ dZ dS)raSets LC_NUMERIC to a locale with comma as decimal point. Classes derived from this class have setup and teardown methods that run tests with locale.LC_NUMERIC set to a locale where commas (',') are used as the decimal point instead of periods ('.'). On exit the locale is restored to the initial locale. It also serves as context manager with the same effect. If no such locale is available, the test is skipped. .. versionadded:: 1.15.0 c|jtjdtjtj|jdSNzNo French locale availabler  tst_localepytestskipr rrselfs r setup_methodz$CommaDecimalPointLocale.setup_method<< ? " K4 5 5 5*4?CCCCCCcPtjtj|jdSNr r rr cur_localers rteardown_methodz'CommaDecimalPointLocale.teardown_methodA#*4?CCCCCCr"c|jtjdtjtj|jdSrrrs r __enter__z!CommaDecimalPointLocale.__enter__Dr!r"cPtjtj|jdSr$r%)rtypevalue tracebacks r__exit__z CommaDecimalPointLocale.__exit__Ir(r"N) __name__ __module__ __qualname____doc__rr&rr r'r*r/r"rrr.s}   ?>@@ZDDD DDDDDD DDDDDr")r3r r r__ALL__rrr4r"rr6s $ %"""DDDDDDDDDDDr"