blob: 1c9b84f537ba880842b3288ca4400c370f765d8d [file] [log] [blame]
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00001import os
2import signal
Victor Stinnerf11d0d22015-09-15 12:15:59 +02003import subprocess
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00004import unittest
5
Berker Peksagce643912015-05-06 06:33:17 +03006from test import support
7from test.support import script_helper
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00008
9
10@unittest.skipUnless(os.name == "posix", "only supported on Unix")
11class EINTRTests(unittest.TestCase):
12
13 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
14 def test_all(self):
15 # Run the tester in a sub-process, to make sure there is only one
16 # thread (for reliable signal delivery).
17 tester = support.findfile("eintr_tester.py", subdir="eintrdata")
Victor Stinner98f223d2015-10-01 13:16:43 +020018 # use -u to try to get the full output if the test hangs or crash
19 script_helper.assert_python_ok("-u", tester)
Charles-François Natali6e6c59b2015-02-07 13:27:50 +000020
21
22if __name__ == "__main__":
23 unittest.main()