Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ensure error is raised when no arg is supplied
  • Loading branch information
itsankitkp committed Apr 23, 2023
commit df8aaf2acb57da2704ddef808ef0208d6e2d1212
3 changes: 3 additions & 0 deletions Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def test_register_at_fork(self):
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."):
Comment thread
corona10 marked this conversation as resolved.
Outdated
# 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='')
Expand Down