mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
#12788: fix error in test_policy when run under refleak detection
This commit is contained in:
parent
9a03ecfa50
commit
7104c7295c
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue