Example #1
0
 def test_cannot_copy_readonly(self):
     wb = Workbook()
     ws = wb.active
     wb._read_only = True
     with pytest.raises(ValueError):
         wb.copy_worksheet(ws)
Example #2
0
def test_create_sheet_readonly():
    wb = Workbook()
    wb._read_only = True
    with pytest.raises(ReadOnlyWorkbookException):
        wb.create_sheet()