mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-40280: Add requires_fork test helper (GH-30622)
This commit is contained in:
parent
5cd9a162cd
commit
91e33ac3d0
10 changed files with 34 additions and 18 deletions
|
@ -198,7 +198,7 @@ class TestSupport(unittest.TestCase):
|
|||
f'temporary directory {path!r}: '),
|
||||
warn)
|
||||
|
||||
@unittest.skipUnless(hasattr(os, "fork"), "test requires os.fork")
|
||||
@support.requires_fork()
|
||||
def test_temp_dir__forked_child(self):
|
||||
"""Test that a forked child process does not remove the directory."""
|
||||
# See bpo-30028 for details.
|
||||
|
@ -447,6 +447,7 @@ class TestSupport(unittest.TestCase):
|
|||
|
||||
@unittest.skipUnless(hasattr(os, 'waitpid') and hasattr(os, 'WNOHANG'),
|
||||
'need os.waitpid() and os.WNOHANG')
|
||||
@support.requires_fork()
|
||||
def test_reap_children(self):
|
||||
# Make sure that there is no other pending child process
|
||||
support.reap_children()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue