1import os 2import signal 3import unittest 4from test import support 5from test.support import script_helper 6 7 8@unittest.skipUnless(os.name == "posix", "only supported on Unix") 9class EINTRTests(unittest.TestCase): 10 11 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") 12 @support.requires_resource('walltime') 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 script = support.findfile("_test_eintr.py") 17 script_helper.run_test_script(script) 18 19 20if __name__ == "__main__": 21 unittest.main() 22