diff options
author | Christian Heimes <christian@python.org> | 2022-01-16 21:52:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 21:52:43 (GMT) |
commit | 91e33ac3d08a1c6004c469da2c0e2a97b5bdc53c (patch) | |
tree | 93e1ad6d692a706bd319b6c705642487499f4965 /Lib/test/test_support.py | |
parent | 5cd9a162cd02a3d0f1b0a182d80feeb17439e84f (diff) | |
download | cpython-91e33ac3d08a1c6004c469da2c0e2a97b5bdc53c.zip cpython-91e33ac3d08a1c6004c469da2c0e2a97b5bdc53c.tar.gz cpython-91e33ac3d08a1c6004c469da2c0e2a97b5bdc53c.tar.bz2 |
bpo-40280: Add requires_fork test helper (GH-30622)
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r-- | Lib/test/test_support.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index d5a1d44..4dac7f6 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -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() |