ยปCore Development>Code coverage>Lib/test/test_eintr.py

Python code coverage for Lib/test/test_eintr.py

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