test_eintr.py 584 B

1234567891011121314151617181920
  1. import os
  2. import signal
  3. import unittest
  4. from test import support
  5. from test.support import script_helper
  6. @unittest.skipUnless(os.name == "posix", "only supported on Unix")
  7. class EINTRTests(unittest.TestCase):
  8. @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
  9. def test_all(self):
  10. # Run the tester in a sub-process, to make sure there is only one
  11. # thread (for reliable signal delivery).
  12. script = support.findfile("_test_eintr.py")
  13. script_helper.run_test_script(script)
  14. if __name__ == "__main__":
  15. unittest.main()