本文整理匯總了Python中_strptime._getlang方法的典型用法代碼示例。如果您正苦於以下問題:Python _strptime._getlang方法的具體用法?Python _strptime._getlang怎麽用?Python _strptime._getlang使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類_strptime
的用法示例。
在下文中一共展示了_strptime._getlang方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_basic
# 需要導入模塊: import _strptime [as 別名]
# 或者: from _strptime import _getlang [as 別名]
def test_basic(self):
self.assertEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME))
示例2: test_lang
# 需要導入模塊: import _strptime [as 別名]
# 或者: from _strptime import _getlang [as 別名]
def test_lang(self):
# Make sure lang is set to what _getlang() returns
# Assuming locale has not changed between now and when self.LT_ins was created
self.assertEqual(self.LT_ins.lang, _strptime._getlang())
示例3: test_basic
# 需要導入模塊: import _strptime [as 別名]
# 或者: from _strptime import _getlang [as 別名]
def test_basic(self):
self.failUnlessEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME))
示例4: test_lang
# 需要導入模塊: import _strptime [as 別名]
# 或者: from _strptime import _getlang [as 別名]
def test_lang(self):
# Make sure lang is set to what _getlang() returns
# Assuming locale has not changed between now and when self.LT_ins was created
self.failUnlessEqual(self.LT_ins.lang, _strptime._getlang())