File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import weakref
1212from collections import UserList
1313from test import support
14- from test .support import os_helper , threading_helper
14+ from test .support import (
15+ os_helper ,
16+ set_recursion_limit ,
17+ threading_helper
18+ )
1519from test .support .script_helper import assert_python_ok
1620from .utils import CTestCase , PyTestCase
1721
@@ -1591,12 +1595,12 @@ def write(self, b):
15911595 ('reconfigure' , lambda : wrapper .reconfigure (line_buffering = True )),
15921596 ]
15931597 for name , method in tests :
1594- with self .subTest (name ):
1598+ with self .subTest (name ), set_recursion_limit ( 100 ) :
15951599 wrapper = self .TextIOWrapper (EvilBuffer (self .MockRawIO ()), encoding = 'utf-8' )
15961600 wrapper_ref = weakref .ref (wrapper )
15971601 # These used to crash; now either return detached or keep
15981602 # running until out of stack.
1599- self .assertRaisesRegex ( RuntimeError , "detached|recursion depth exceeded" , method )
1603+ self .assertRaises (( RecursionError , RuntimeError ) , method )
16001604 wrapper_ref = None
16011605 del wrapper
16021606
You can’t perform that action at this time.
0 commit comments