mirror of https://github.com/python/cpython
gh-103724: Add test case if no arg as provided in os.register_at_fork (gh-103725)
This commit is contained in:
parent
82932b72ca
commit
7255bbd4a1
|
@ -231,6 +231,9 @@ class PosixTester(unittest.TestCase):
|
|||
with self.assertRaises(TypeError, msg="Invalid arg was allowed"):
|
||||
# Ensure a combination of valid and invalid is an error.
|
||||
os.register_at_fork(before=None, after_in_parent=lambda: 3)
|
||||
with self.assertRaises(TypeError, msg="At least one argument is required"):
|
||||
# when no arg is passed
|
||||
os.register_at_fork()
|
||||
with self.assertRaises(TypeError, msg="Invalid arg was allowed"):
|
||||
# Ensure a combination of valid and invalid is an error.
|
||||
os.register_at_fork(before=lambda: None, after_in_child='')
|
||||
|
|
Loading…
Reference in New Issue