| 1 | n/a | import os |
|---|
| 2 | n/a | import signal |
|---|
| 3 | n/a | import unittest |
|---|
| 4 | n/a | |
|---|
| 5 | n/a | from test import support |
|---|
| 6 | n/a | from test.support import script_helper |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | |
|---|
| 9 | n/a | @unittest.skipUnless(os.name == "posix", "only supported on Unix") |
|---|
| 10 | n/a | class EINTRTests(unittest.TestCase): |
|---|
| 11 | n/a | |
|---|
| 12 | n/a | @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") |
|---|
| 13 | n/a | def test_all(self): |
|---|
| 14 | n/a | # Run the tester in a sub-process, to make sure there is only one |
|---|
| 15 | n/a | # thread (for reliable signal delivery). |
|---|
| 16 | n/a | tester = support.findfile("eintr_tester.py", subdir="eintrdata") |
|---|
| 17 | n/a | # use -u to try to get the full output if the test hangs or crash |
|---|
| 18 | n/a | script_helper.assert_python_ok("-u", tester) |
|---|
| 19 | n/a | |
|---|
| 20 | n/a | |
|---|
| 21 | n/a | if __name__ == "__main__": |
|---|
| 22 | n/a | unittest.main() |
|---|