本文整理匯總了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()