本文整理匯總了Python中dirigible.sheet.worksheet.Worksheet.values方法的典型用法代碼示例。如果您正苦於以下問題:Python Worksheet.values方法的具體用法?Python Worksheet.values怎麽用?Python Worksheet.values使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dirigible.sheet.worksheet.Worksheet
的用法示例。
在下文中一共展示了Worksheet.values方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_getitem_should_use_original_key_if_to_location_gives_none
# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import values [as 別名]
def test_getitem_should_use_original_key_if_to_location_gives_none(self):
ws = Worksheet()
ws.to_location = Mock(return_value=(3, 4))
ws[3, 4].formula = "hello"
self.assertEquals(ws.to_location.call_args_list, [(((3, 4),), {})])
self.assertEquals(ws.keys(), [(3, 4)])
self.assertEquals(ws.values()[0].formula, "hello")
示例2: test_getitem_should_use_to_location_result_if_it_is_not_none
# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import values [as 別名]
def test_getitem_should_use_to_location_result_if_it_is_not_none(self):
ws = Worksheet()
ws.to_location = Mock(return_value=(1, 2))
ws[3, 4].formula = "hello"
self.assertEquals(ws.to_location.call_args_list, [(((3, 4),), {})])
self.assertEquals(ws.keys(), [(1, 2)])
self.assertEquals(ws.values()[0].formula, "hello")