Charles-François Natali | 6e6c59b | 2015-02-07 13:27:50 +0000 | [diff] [blame] | 1 | import os |
| 2 | import signal |
| 3 | import unittest |
| 4 | |
Berker Peksag | ce64391 | 2015-05-06 06:33:17 +0300 | [diff] [blame] | 5 | from test import support |
| 6 | from test.support import script_helper |
Charles-François Natali | 6e6c59b | 2015-02-07 13:27:50 +0000 | [diff] [blame] | 7 | |
| 8 | |
| 9 | @unittest.skipUnless(os.name == "posix", "only supported on Unix") |
| 10 | class 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") |
| 17 | script_helper.assert_python_ok(tester) |
| 18 | |
| 19 | |
| 20 | if __name__ == "__main__": |
| 21 | unittest.main() |