コード例 #1
0
def test_read_only():
    cell = ReadOnlyCell(sheet=None, row=None, column=None, value=1)
    assert cell.value == 1
    with pytest.raises(AttributeError):
        cell.value = 10
    with pytest.raises(AttributeError):
        cell.style_id = 1
コード例 #2
0
ファイル: test_read_only.py プロジェクト: ericgazoni/openpyxl
def test_read_only():
    cell = ReadOnlyCell(None, None, 1, None)
    with pytest.raises(AttributeError):
        cell.value = 10
    with pytest.raises(AttributeError):
        cell.style_id = 1
コード例 #3
0
def test_read_only():
    cell = ReadOnlyCell(None, None, 1, None)
    with pytest.raises(AttributeError):
        cell.value = 10
    with pytest.raises(AttributeError):
        cell.style_id = 1