mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +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
|
@ -1293,7 +1293,7 @@ class TestModule(unittest.TestCase):
|
|||
# tests validity but not completeness of the __all__ list
|
||||
self.assertTrue(set(random.__all__) <= set(dir(random)))
|
||||
|
||||
@unittest.skipUnless(hasattr(os, "fork"), "fork() required")
|
||||
@test.support.requires_fork()
|
||||
def test_after_fork(self):
|
||||
# Test the global Random instance gets reseeded in child
|
||||
r, w = os.pipe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue