本文整理汇总了Python中pandas.util.testing.get_locales方法的典型用法代码示例。如果您正苦于以下问题:Python testing.get_locales方法的具体用法?Python testing.get_locales怎么用?Python testing.get_locales使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandas.util.testing
的用法示例。
在下文中一共展示了testing.get_locales方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_locales_prefix
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def test_get_locales_prefix():
first_locale = _all_locales[0]
assert len(tm.get_locales(prefix=first_locale[:2])) > 0
示例2: setup_class
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def setup_class(cls):
cls.locales = tm.get_locales()
cls.current_locale = locale.getlocale()
if not cls.locales:
pytest.skip("No locales found")
示例3: test_get_locales
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def test_get_locales(self):
# all systems should have at least a single locale
assert len(tm.get_locales()) > 0
示例4: test_get_locales_prefix
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def test_get_locales_prefix(self):
if len(self.locales) == 1:
pytest.skip("Only a single locale found, no point in "
"trying to test filtering locale prefixes")
first_locale = self.locales[0]
assert len(tm.get_locales(prefix=first_locale[:2])) > 0
示例5: test_locale
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def test_locale(self):
if sys.platform == 'win32':
pytest.skip(
"skipping on win platforms as locale not available")
# GH9744
locales = tm.get_locales()
assert len(locales) >= 1
示例6: setUpClass
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def setUpClass(cls):
super(TestLocaleUtils, cls).setUpClass()
cls.locales = tm.get_locales()
if not cls.locales:
raise nose.SkipTest("No locales found")
if os.name == 'nt': # we're on windows
raise nose.SkipTest("Running on Windows")
示例7: test_get_locales_prefix
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def test_get_locales_prefix(self):
if len(self.locales) == 1:
raise nose.SkipTest("Only a single locale found, no point in "
"trying to test filtering locale prefixes")
first_locale = self.locales[0]
assert len(tm.get_locales(prefix=first_locale[:2])) > 0
示例8: setUpClass
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def setUpClass(cls):
super(TestGoogle, cls).setUpClass()
cls.locales = tm.get_locales(prefix='en_US')
if not cls.locales:
raise nose.SkipTest("US English locale not available for testing")
示例9: setup_class
# 需要导入模块: from pandas.util import testing [as 别名]
# 或者: from pandas.util.testing import get_locales [as 别名]
def setup_class(cls):
cls.locales = tm.get_locales()
cls.current_locale = locale.getlocale()
if not cls.locales:
pytest.skip("No locales found")
tm._skip_if_windows()