summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-03-17 01:39:57 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-03-17 01:39:57 (GMT)
commit7104c7295c1f7f99a8323b55c4f2868dfd58f33d (patch)
tree67db3804b5b98a59590af605e5bf84f9b57a3ec5
parent9a03ecfa50edd1f75bfffbe1d8849d629b8f5b43 (diff)
downloadcpython-7104c7295c1f7f99a8323b55c4f2868dfd58f33d.zip
cpython-7104c7295c1f7f99a8323b55c4f2868dfd58f33d.tar.gz
cpython-7104c7295c1f7f99a8323b55c4f2868dfd58f33d.tar.bz2
#12788: fix error in test_policy when run under refleak detection
-rw-r--r--Lib/test/test_email/test_policy.py4
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)