blob: 25f86d31de35481e333ef8f81eb6dbc82c1cf774 [file] [log] [blame]
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00001import os
2import signal
3import unittest
4
Berker Peksagce643912015-05-06 06:33:17 +03005from test import support
6from test.support import script_helper
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00007
8
9@unittest.skipUnless(os.name == "posix", "only supported on Unix")
10class EINTRTests(unittest.TestCase):
11
12 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
13 def test_all(self):
14 # Run the tester in a sub-process, to make sure there is only one
15 # thread (for reliable signal delivery).
16 tester = support.findfile("eintr_tester.py", subdir="eintrdata")
Victor Stinner98f223d2015-10-01 13:16:43 +020017 # use -u to try to get the full output if the test hangs or crash
18 script_helper.assert_python_ok("-u", tester)
Charles-François Natali6e6c59b2015-02-07 13:27:50 +000019
20
21if __name__ == "__main__":
22 unittest.main()