mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
check windows fd validity (closes #16992)
This commit is contained in:
parent
d0c665e062
commit
08e153ae37
3 changed files with 14 additions and 3 deletions
|
@ -227,6 +227,13 @@ class WindowsSignalTests(unittest.TestCase):
|
|||
signal.signal(7, handler)
|
||||
|
||||
|
||||
class WakeupFDTests(unittest.TestCase):
|
||||
|
||||
def test_invalid_fd(self):
|
||||
fd = support.make_bad_fd()
|
||||
self.assertRaises(ValueError, signal.set_wakeup_fd, fd)
|
||||
|
||||
|
||||
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
|
||||
class WakeupSignalTests(unittest.TestCase):
|
||||
TIMEOUT_FULL = 10
|
||||
|
@ -485,8 +492,9 @@ class ItimerTest(unittest.TestCase):
|
|||
|
||||
def test_main():
|
||||
test_support.run_unittest(BasicSignalTests, InterProcessSignalTests,
|
||||
WakeupSignalTests, SiginterruptTest,
|
||||
ItimerTest, WindowsSignalTests)
|
||||
WakeupFDTests, WakeupSignalTests,
|
||||
SiginterruptTest, ItimerTest,
|
||||
WindowsSignalTests)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue