File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
mmengine/testing/_internal Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -88,16 +88,15 @@ def wrapper(self):
8888
8989 return types .MethodType (wrapper , self )
9090
91- # The main process spawns N subprocesses that run the test.
92- # Constructor patches current instance test method to
93- # assume the role of the main process and join its subprocesses,
94- # or run the underlying test function.
95- def __init__ ( self , method_name : str = 'runTest' ) -> None :
96- super (). __init__ ( method_name )
91+ def setUp ( self ) -> None :
92+ # The main process spawns N subprocesses that run the test.
93+ # This patches current instance test method to
94+ # assume the role of the main process and join its subprocesses,
95+ # or run the underlying test function.
96+ method_name = self . _testMethodName
9797 fn = getattr (self , method_name )
9898 setattr (self , method_name , self .join_or_run (fn ))
9999
100- def setUp (self ) -> None :
101100 super ().setUp ()
102101 self .skip_return_code_checks = [] # type: ignore[var-annotated]
103102 self .processes = [] # type: ignore[var-annotated]
You can’t perform that action at this time.
0 commit comments