@@ -468,6 +468,11 @@ def test_style(self):
468468 )
469469 )
470470 )
471+ with self .assertRaises (RuntimeError ) as context :
472+ f .unprotect_workbook ("" )
473+ self .assertEqual (str (context .exception ), "password length invalid" )
474+ self .assertIsNone (f .unprotect_workbook ("password" ))
475+ self .assertIsNone (f .unprotect_workbook ())
471476 self .assertIsNone (f .move_sheet ("Sheet2" , "Sheet1" ))
472477 with self .assertRaises (RuntimeError ) as context :
473478 f .move_sheet ("SheetN" , "Sheet1" )
@@ -1569,15 +1574,15 @@ def test_sheet_visible(self):
15691574 f .set_sheet_visible ("Sheet:1" , False , True )
15701575 self .assertEqual (
15711576 str (context .exception ),
1572- "the sheet can not contain any of the characters :\/?*[or]" ,
1577+ "the sheet can not contain any of the characters :\\ /?*[or]" ,
15731578 )
15741579 self .assertTrue (f .get_sheet_visible ("Sheet1" ))
15751580 self .assertFalse (f .get_sheet_visible ("Sheet2" ))
15761581 with self .assertRaises (RuntimeError ) as context :
15771582 f .get_sheet_visible ("Sheet:1" )
15781583 self .assertEqual (
15791584 str (context .exception ),
1580- "the sheet can not contain any of the characters :\/?*[or]" ,
1585+ "the sheet can not contain any of the characters :\\ /?*[or]" ,
15811586 )
15821587 self .assertIsNone (f .save_as (os .path .join ("test" , "TestSheetVisible.xlsx" )))
15831588 self .assertIsNone (f .close ())
0 commit comments