File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -479,3 +479,8 @@ def end_data(self):
479479 self .addObject (Data .fromBase64 (self .getData ()))
480480 def end_date (self ):
481481 self .addObject (_dateFromString (self .getData ()))
482+
483+
484+ class InvalidFileException (ValueError ):
485+ def __init__ (self , message = "Invalid file" ):
486+ ValueError .__init__ (self , message )
Original file line number Diff line number Diff line change @@ -209,9 +209,9 @@ def test_nondictroot(self):
209209 self .assertEqual (test2 , result2 )
210210
211211 def test_xml_plist_with_entity_decl (self ):
212- with self .assertRaisesRegex (plistlib .InvalidFileException ,
212+ with self .assertRaisesRegexp (plistlib .InvalidFileException ,
213213 "XML entity declarations are not supported" ):
214- plistlib .loads (XML_PLIST_WITH_ENTITY , fmt = plistlib . FMT_XML )
214+ plistlib .readPlistFromString (XML_PLIST_WITH_ENTITY )
215215
216216def test_main ():
217217 test_support .run_unittest (TestPlistlib )
You can’t perform that action at this time.
0 commit comments