@@ -6717,18 +6717,18 @@ class ThreadsMixin(BaseMixin):
67176717#
67186718
67196719
6720- def get_temp_class (test_name , module , base , Mixin , type_ ):
6720+ def get_temp_class (newname , __module__ , base , Mixin , type_ ):
67216721 # RUSTPYTHON specific function to define the Temp class
67226722
67236723 # test_rapid_restart fails on:
67246724 # - 'test_multiprocessing_fork' in 'WithManagerTestManagerRestart' test, on windows and mac
67256725 # - 'test_multiprocessing_forkserver' in 'WithManagerTestManagerRestart' test on windows
67266726 # - `test_multiprocessing_spawn` in 'WithManagerTestManagerRestart' test on windows
67276727 if (
6728- test_name == 'WithManagerTestManagerRestart' and
6728+ newname == 'WithManagerTestManagerRestart' and
67296729 (
67306730 sys .platform == "win32" or
6731- (sys .platform == "darwin" and 'test_multiprocessing_fork' in module )
6731+ (sys .platform == "darwin" and 'test_multiprocessing_fork' in __module__ )
67326732 )
67336733 ):
67346734 class Temp (base , Mixin , unittest .TestCase ):
@@ -6765,21 +6765,7 @@ def install_tests_in_module_dict(remote_globs, start_method,
67656765 continue
67666766 newname = 'With' + type_ .capitalize () + name [1 :]
67676767 Mixin = local_globs [type_ .capitalize () + 'Mixin' ]
6768- if (newname == 'WithManagerTestManagerRestart' and
6769- (
6770- sys .platform == "win32" or
6771- (sys .platform == "darwin" and '.test_multiprocessing_fork.' in __module__ )
6772- )):
6773- class Temp (base , Mixin , unittest .TestCase ):
6774- @unittest .expectedFailure #TODO: RUSTPYTHON
6775- def test_rapid_restart (self ):
6776- super ().test_rapid_restart ()
6777-
6778- else :
6779- class Temp (base , Mixin , unittest .TestCase ):
6780- pass
6781- if type_ == 'manager' :
6782- Temp = hashlib_helper .requires_hashdigest ('sha256' )(Temp )
6768+ Temp = get_temp_class (newname , __module__ , base , Mixin , type_ )
67836769 Temp .__name__ = Temp .__qualname__ = newname
67846770 Temp .__module__ = __module__
67856771 Temp .start_method = start_method
0 commit comments