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 = 1
Example #2
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
def test_read_only(dummy_sheet):
    cell = ReadOnlyCell(sheet=dummy_sheet, row=None, column=None, value='1')
    assert cell.value == 1
    with pytest.raises(AttributeError):
        cell.value = 10
    with pytest.raises(AttributeError):
        cell.style = 1
Example #4
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
Example #5
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