From 7104c7295c1f7f99a8323b55c4f2868dfd58f33d Mon Sep 17 00:00:00 2001 From: R David Murray Date: Fri, 16 Mar 2012 21:39:57 -0400 Subject: #12788: fix error in test_policy when run under refleak detection --- Lib/test/test_email/test_policy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v0.12