MCPcopy Index your code
hub / github.com/python/cpython / test_set_executable

Method test_set_executable

Lib/test/_test_multiprocessing.py:382–396  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

380
381 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
382 def test_set_executable(self):
383 if self.TYPE == 'threads':
384 self.skipTest(f'test not appropriate for {self.TYPE}')
385 paths = [
386 sys.executable, # str
387 os.fsencode(sys.executable), # bytes
388 os_helper.FakePath(sys.executable), # os.PathLike
389 os_helper.FakePath(os.fsencode(sys.executable)), # os.PathLike bytes
390 ]
391 for path in paths:
392 self.set_executable(path)
393 p = self.Process()
394 p.start()
395 p.join()
396 self.assertEqual(p.exitcode, 0)
397
398 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
399 @support.requires_resource('cpu')

Callers

nothing calls this directly

Calls 6

skipTestMethod · 0.80
set_executableMethod · 0.45
ProcessMethod · 0.45
startMethod · 0.45
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected