Ejemplo n.º 1
0
 def test_cannot_copy_writeonly(self):
     wb = Workbook(write_only=True)
     ws = wb.create_sheet()
     with pytest.raises(ValueError):
         wb.copy_worksheet(ws)
Ejemplo n.º 2
0
 def test_worksheet_copy_name(self, title, copy):
     wb = Workbook()
     ws1 = wb.active
     ws1.title = title
     ws2 = wb.copy_worksheet(ws1)
     assert ws2.title == copy
Ejemplo n.º 3
0
 def test_cannot_copy_readonly(self):
     wb = Workbook()
     ws = wb.active
     wb._read_only = True
     with pytest.raises(ValueError):
         wb.copy_worksheet(ws)
Ejemplo n.º 4
0
 def test_worksheet_copy(self):
     wb = Workbook()
     ws1 = wb.active
     ws2 = wb.copy_worksheet(ws1)
     assert ws2 is not None