diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 4bb93eee2ec6d5..fd446c8145850c 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -3557,7 +3557,7 @@ class F: # File with bad read, no readline class F: read = bad_property - self.assertRaises(ZeroDivisionError, self.Unpickler, F()) + self.assertRaises((AttributeError, ZeroDivisionError), self.Unpickler, F()) # File with bad peek class F: