當前位置: 首頁>>代碼示例>>Python>>正文


Python Worksheet.A1方法代碼示例

本文整理匯總了Python中dirigible.sheet.worksheet.Worksheet.A1方法的典型用法代碼示例。如果您正苦於以下問題:Python Worksheet.A1方法的具體用法?Python Worksheet.A1怎麽用?Python Worksheet.A1使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dirigible.sheet.worksheet.Worksheet的用法示例。


在下文中一共展示了Worksheet.A1方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_setattr_should_not_delegate_to_setitem_if_attr_name_is_not_valid_cell_name

# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import A1 [as 別名]
    def test_setattr_should_not_delegate_to_setitem_if_attr_name_is_not_valid_cell_name(self):
        ws = Worksheet()
        ws.__setitem__ = Mock()

        ws.A1 = 23

        self.assertEquals( ws.__setitem__.call_args_list, [] )
        self.assertEquals( ws.A1, 23 )
開發者ID:bwhmather,項目名稱:dirigible-spreadsheet,代碼行數:10,代碼來源:test_worksheet.py

示例2: test_load_constants_should_clear_errors_for_constants

# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import A1 [as 別名]
    def test_load_constants_should_clear_errors_for_constants(self):
        cell = Cell()
        cell.formula = "a constant"
        cell.error = 'Ohno!'
        worksheet = Worksheet()
        worksheet.A1 = cell

        load_constants(worksheet)

        self.assertIsNone(cell.error)
開發者ID:bwhmather,項目名稱:dirigible-spreadsheet,代碼行數:12,代碼來源:test_calculate.py

示例3: test_sheet_to_ui_json_grid_data_should_not_include_totally_empty_cells

# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import A1 [as 別名]
    def test_sheet_to_ui_json_grid_data_should_not_include_totally_empty_cells(self):
        worksheet = Worksheet()
        worksheet.A1 = Cell()

        expected_json_contents = {
            'bottom': 10,
            'left': 0,
            'right': 10,
            'topmost': 0
        }
        self.assertEquals(json.loads(sheet_to_ui_json_grid_data(worksheet, (0, 0, 10, 10))), expected_json_contents)
開發者ID:bwhmather,項目名稱:dirigible-spreadsheet,代碼行數:13,代碼來源:test_ui_jsonifier.py

示例4: test_setattr_should_delegate_to_setitem_if_attr_name_is_valid_cell_name

# 需要導入模塊: from dirigible.sheet.worksheet import Worksheet [as 別名]
# 或者: from dirigible.sheet.worksheet.Worksheet import A1 [as 別名]
    def test_setattr_should_delegate_to_setitem_if_attr_name_is_valid_cell_name(
        self, mock_name_to_coords
    ):
        def name_to_coords(name):
            if name == 'A1':
                return (2, 3)
            else:
                return None
        mock_name_to_coords.side_effect = name_to_coords

        ws = Worksheet()
        ws.__setitem__ = Mock()

        ws.A1 = 23

        self.assertEquals( ws.__setitem__.call_args_list, [(((2, 3), 23), {})] )
開發者ID:bwhmather,項目名稱:dirigible-spreadsheet,代碼行數:18,代碼來源:test_worksheet.py


注:本文中的dirigible.sheet.worksheet.Worksheet.A1方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。