Issue 24374: Plug refleak in set_coroutine_wrapper

This commit is contained in:
Yury Selivanov 2015-06-04 10:16:51 -04:00
parent 53f95024d7
commit 94c2263005
2 changed files with 21 additions and 33 deletions

View file

@ -1006,10 +1006,10 @@ class SysSetCoroWrapperTest(unittest.TestCase):
sys.set_coroutine_wrapper(wrapper)
try:
with self.assertRaisesRegex(
with silence_coro_gc(), self.assertRaisesRegex(
RuntimeError,
"coroutine wrapper.*\.wrapper at 0x.*attempted to "
"recursively wrap <coroutine.*\.wrap"):
"recursively wrap .* wrap .*"):
foo()
finally: