blob: 75452f2d413e4d9c9a303ae3410158d2327d5c0c [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
4import sys
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00005import unittest
6
Berker Peksagce643912015-05-06 06:33:17 +03007from test import support
8from test.support import script_helper
Charles-François Natali6e6c59b2015-02-07 13:27:50 +00009
10
11@unittest.skipUnless(os.name == "posix", "only supported on Unix")
12class EINTRTests(unittest.TestCase):
13
14 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
15 def test_all(self):
16 # Run the tester in a sub-process, to make sure there is only one
17 # thread (for reliable signal delivery).
18 tester = support.findfile("eintr_tester.py", subdir="eintrdata")
Victor Stinner98f223d2015-10-01 13:16:43 +020019 # use -u to try to get the full output if the test hangs or crash
20 script_helper.assert_python_ok("-u", tester)
Charles-François Natali6e6c59b2015-02-07 13:27:50 +000021
22
23if __name__ == "__main__":
24 unittest.main()