@@ -3070,15 +3070,9 @@ def check_waitpid(self, code, exitcode, callback=None):
30703070 self .assertEqual (os .waitstatus_to_exitcode (status ), exitcode )
30713071 self .assertEqual (pid2 , pid )
30723072
3073- # TODO: RUSTPYTHON (AttributeError: module 'os' has no attribute 'spawnv')
3074- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
3075- @unittest .expectedFailure
30763073 def test_waitpid (self ):
30773074 self .check_waitpid (code = 'pass' , exitcode = 0 )
30783075
3079- # TODO: RUSTPYTHON (AttributeError: module 'os' has no attribute 'spawnv')
3080- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
3081- @unittest .expectedFailure
30823076 def test_waitstatus_to_exitcode (self ):
30833077 exitcode = 23
30843078 code = f'import sys; sys.exit({ exitcode } )'
@@ -3110,9 +3104,6 @@ def test_waitstatus_to_exitcode_windows(self):
31103104 with self .assertRaises (OverflowError ):
31113105 os .waitstatus_to_exitcode (- 1 )
31123106
3113- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
3114- # TODO: RUSTPYTHON (AttributeError: module 'os' has no attribute 'spawnv')
3115- @unittest .expectedFailure
31163107 # Skip the test on Windows
31173108 @unittest .skipUnless (hasattr (signal , 'SIGKILL' ), 'need signal.SIGKILL' )
31183109 def test_waitstatus_to_exitcode_kill (self ):
@@ -3154,35 +3145,30 @@ def create_args(self, *, with_env=False, use_bytes=False):
31543145
31553146 return args
31563147
3157- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31583148 @requires_os_func ('spawnl' )
31593149 def test_spawnl (self ):
31603150 args = self .create_args ()
31613151 exitcode = os .spawnl (os .P_WAIT , args [0 ], * args )
31623152 self .assertEqual (exitcode , self .exitcode )
31633153
3164- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31653154 @requires_os_func ('spawnle' )
31663155 def test_spawnle (self ):
31673156 args = self .create_args (with_env = True )
31683157 exitcode = os .spawnle (os .P_WAIT , args [0 ], * args , self .env )
31693158 self .assertEqual (exitcode , self .exitcode )
31703159
3171- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31723160 @requires_os_func ('spawnlp' )
31733161 def test_spawnlp (self ):
31743162 args = self .create_args ()
31753163 exitcode = os .spawnlp (os .P_WAIT , args [0 ], * args )
31763164 self .assertEqual (exitcode , self .exitcode )
31773165
3178- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31793166 @requires_os_func ('spawnlpe' )
31803167 def test_spawnlpe (self ):
31813168 args = self .create_args (with_env = True )
31823169 exitcode = os .spawnlpe (os .P_WAIT , args [0 ], * args , self .env )
31833170 self .assertEqual (exitcode , self .exitcode )
31843171
3185- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31863172 @requires_os_func ('spawnv' )
31873173 def test_spawnv (self ):
31883174 args = self .create_args ()
@@ -3193,35 +3179,32 @@ def test_spawnv(self):
31933179 exitcode = os .spawnv (os .P_WAIT , FakePath (args [0 ]), args )
31943180 self .assertEqual (exitcode , self .exitcode )
31953181
3196- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
31973182 @requires_os_func ('spawnve' )
31983183 def test_spawnve (self ):
31993184 args = self .create_args (with_env = True )
32003185 exitcode = os .spawnve (os .P_WAIT , args [0 ], args , self .env )
32013186 self .assertEqual (exitcode , self .exitcode )
32023187
3203- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
32043188 @requires_os_func ('spawnvp' )
32053189 def test_spawnvp (self ):
32063190 args = self .create_args ()
32073191 exitcode = os .spawnvp (os .P_WAIT , args [0 ], args )
32083192 self .assertEqual (exitcode , self .exitcode )
32093193
3210- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
32113194 @requires_os_func ('spawnvpe' )
32123195 def test_spawnvpe (self ):
32133196 args = self .create_args (with_env = True )
32143197 exitcode = os .spawnvpe (os .P_WAIT , args [0 ], args , self .env )
32153198 self .assertEqual (exitcode , self .exitcode )
32163199
3217- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
32183200 @requires_os_func ('spawnv' )
32193201 def test_nowait (self ):
32203202 args = self .create_args ()
32213203 pid = os .spawnv (os .P_NOWAIT , args [0 ], args )
32223204 support .wait_process (pid , exitcode = self .exitcode )
32233205
3224- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
3206+ # TODO: RUSTPYTHON fix spawnv bytes
3207+ @unittest .expectedFailure
32253208 @requires_os_func ('spawnve' )
32263209 def test_spawnve_bytes (self ):
32273210 # Test bytes handling in parse_arglist and parse_envlist (#28114)
@@ -3303,12 +3286,10 @@ def _test_invalid_env(self, spawn):
33033286 exitcode = spawn (os .P_WAIT , args [0 ], args , newenv )
33043287 self .assertEqual (exitcode , 0 )
33053288
3306- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
33073289 @requires_os_func ('spawnve' )
33083290 def test_spawnve_invalid_env (self ):
33093291 self ._test_invalid_env (os .spawnve )
33103292
3311- @unittest .skipUnless (hasattr (threading .Lock (), '_at_fork_reinit' ), 'TODO: RUSTPYTHON, test needs lock._at_fork_reinit' )
33123293 @requires_os_func ('spawnvpe' )
33133294 def test_spawnvpe_invalid_env (self ):
33143295 self ._test_invalid_env (os .spawnvpe )
0 commit comments