diff options
-rw-r--r-- | Lib/test/test_email/test_policy.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_policy.py b/Lib/test/test_email/test_policy.py index 086ce40..1c65901 100644 --- a/Lib/test/test_email/test_policy.py +++ b/Lib/test/test_email/test_policy.py @@ -118,7 +118,9 @@ class PolicyAPITests(unittest.TestCase): self.assertEqual(foo.defects, [defect1, defect2]) class MyPolicy(email.policy.Policy): - defects = [] + defects = None + def __init__(self, *args, **kw): + super().__init__(*args, defects=[], **kw) def register_defect(self, obj, defect): self.defects.append(defect) |