/usr/local/lib64/python3.6/site-packages/numpy/core/tests
NameSizeModeActions
data/-0755rm
__pycache__/-0755rm
test_abc.py23280644editdlrm
test_api.py208060644editdlrm
test_arrayprint.py344930644editdlrm
test_conversion_utils.py49810644editdlrm
test_cpu_features.py67850644editdlrm
test_datetime.py1081920644editdlrm
test_defchararray.py243810644editdlrm
test_deprecations.py241870644editdlrm
test_dtype.py492910644editdlrm
test_einsum.py451970644editdlrm
test_errstate.py20660644editdlrm
test_extint128.py56430644editdlrm
test_function_base.py131480644editdlrm
test_getlimits.py42970644editdlrm
test_half.py231020644editdlrm
test_indexerrors.py51300644editdlrm
test_indexing.py492600644editdlrm
test_item_selection.py35790644editdlrm
test_longdouble.py130410644editdlrm
test_machar.py10660644editdlrm
test_memmap.py74640644editdlrm
test_mem_overlap.py288550644editdlrm
test_multiarray.py3197970644editdlrm
test_nditer.py1122980644editdlrm
test_numeric.py1241180644editdlrm
test_numerictypes.py208460644editdlrm
test_overrides.py144330644editdlrm
test_print.py67370644editdlrm
test_protocols.py11680644editdlrm
test_records.py196940644editdlrm
test_regression.py888400644editdlrm
test_scalarbuffer.py40650644editdlrm
test_scalarinherit.py21270644editdlrm
test_scalarmath.py285650644editdlrm
test_scalarprint.py151580644editdlrm
test_scalar_ctors.py25800644editdlrm
test_scalar_methods.py40630644editdlrm
test_shape_base.py246790644editdlrm
test_ufunc.py839780644editdlrm
test_umath.py1214420644editdlrm
test_umath_accuracy.py30440644editdlrm
test_umath_complex.py231450644editdlrm
test_unicode.py125530644editdlrm
test__exceptions.py20050644editdlrm
_locales.py21920644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/numpy/core/tests/_locales.py (2192B)
"""Provide class for testing in French locale """ import sys import locale import pytest __ALL__ = ['CommaDecimalPointLocale'] def find_comma_decimal_point_locale(): """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. """ if sys.platform == 'win32': locales = ['FRENCH'] else: locales = ['fr_FR', 'fr_FR.UTF-8', 'fi_FI', 'fi_FI.UTF-8'] old_locale = locale.getlocale(locale.LC_NUMERIC) new_locale = None try: for loc in locales: try: locale.setlocale(locale.LC_NUMERIC, loc) new_locale = loc break except locale.Error: pass finally: locale.setlocale(locale.LC_NUMERIC, locale=old_locale) return old_locale, new_locale class CommaDecimalPointLocale: """Sets 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 """ (cur_locale, tst_locale) = find_comma_decimal_point_locale() def setup(self): if self.tst_locale is None: pytest.skip("No French locale available") locale.setlocale(locale.LC_NUMERIC, locale=self.tst_locale) def teardown(self): locale.setlocale(locale.LC_NUMERIC, locale=self.cur_locale) def __enter__(self): if self.tst_locale is None: pytest.skip("No French locale available") locale.setlocale(locale.LC_NUMERIC, locale=self.tst_locale) def __exit__(self, type, value, traceback): locale.setlocale(locale.LC_NUMERIC, locale=self.cur_locale)