mirror of https://github.com/python/cpython
#12788: fix error in test_policy when run under refleak detection
This commit is contained in:
parent
9a03ecfa50
commit
7104c7295c
|
@ -118,7 +118,9 @@ class PolicyAPITests(unittest.TestCase):
|
||||||
self.assertEqual(foo.defects, [defect1, defect2])
|
self.assertEqual(foo.defects, [defect1, defect2])
|
||||||
|
|
||||||
class MyPolicy(email.policy.Policy):
|
class MyPolicy(email.policy.Policy):
|
||||||
defects = []
|
defects = None
|
||||||
|
def __init__(self, *args, **kw):
|
||||||
|
super().__init__(*args, defects=[], **kw)
|
||||||
def register_defect(self, obj, defect):
|
def register_defect(self, obj, defect):
|
||||||
self.defects.append(defect)
|
self.defects.append(defect)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue