Charles-François Natali | 6e6c59b | 2015-02-07 13:27:50 +0000 | [diff] [blame] | 1 | import os |
| 2 | import signal |
| 3 | import unittest |
| 4 | |
| 5 | from test import script_helper, support |
| 6 | |
| 7 | |
| 8 | @unittest.skipUnless(os.name == "posix", "only supported on Unix") |
| 9 | class EINTRTests(unittest.TestCase): |
| 10 | |
| 11 | @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") |
| 12 | def test_all(self): |
| 13 | # Run the tester in a sub-process, to make sure there is only one |
| 14 | # thread (for reliable signal delivery). |
| 15 | tester = support.findfile("eintr_tester.py", subdir="eintrdata") |
| 16 | script_helper.assert_python_ok(tester) |
| 17 | |
| 18 | |
| 19 | if __name__ == "__main__": |
| 20 | unittest.main() |