From 68ddbf82e005a88bbdc776ae644a3a386d190aee Mon Sep 17 00:00:00 2001 From: Andrey Maltsev Date: Sun, 2 Apr 2023 13:57:34 +0000 Subject: [PATCH] Update test_eintr.py from Cpython v3.11.2 --- Lib/test/test_eintr.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Lib/test/test_eintr.py diff --git a/Lib/test/test_eintr.py b/Lib/test/test_eintr.py new file mode 100644 index 0000000000..528147802b --- /dev/null +++ b/Lib/test/test_eintr.py @@ -0,0 +1,20 @@ +import os +import signal +import unittest +from test import support +from test.support import script_helper + + +@unittest.skipUnless(os.name == "posix", "only supported on Unix") +class EINTRTests(unittest.TestCase): + + @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") + def test_all(self): + # Run the tester in a sub-process, to make sure there is only one + # thread (for reliable signal delivery). + script = support.findfile("_test_eintr.py") + script_helper.run_test_script(script) + + +if __name__ == "__main__": + unittest.main()