Skip to content

Commit 46410ff

Browse files
CPython Developersyouknowone
authored andcommitted
Add test_multiprocessing from CPython 3.12.3
1 parent 75e868e commit 46410ff

17 files changed

Lines changed: 6729 additions & 0 deletions

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 6307 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os.path
2+
import sys
3+
import unittest
4+
from test import support
5+
6+
if support.PGO:
7+
raise unittest.SkipTest("test is not helpful for PGO")
8+
9+
if sys.platform == "win32":
10+
raise unittest.SkipTest("fork is not available on Windows")
11+
12+
if sys.platform == 'darwin':
13+
raise unittest.SkipTest("test may crash on macOS (bpo-33725)")
14+
15+
def load_tests(*args):
16+
return support.load_package_tests(os.path.dirname(__file__), *args)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'fork', only_type="manager")
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'fork', exclude_types=True)
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'fork', only_type="processes")
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'fork', only_type="threads")
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os.path
2+
import sys
3+
import unittest
4+
from test import support
5+
6+
if support.PGO:
7+
raise unittest.SkipTest("test is not helpful for PGO")
8+
9+
if sys.platform == "win32":
10+
raise unittest.SkipTest("forkserver is not available on Windows")
11+
12+
def load_tests(*args):
13+
return support.load_package_tests(os.path.dirname(__file__), *args)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'forkserver', only_type="manager")
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'forkserver', exclude_types=True)
5+
6+
if __name__ == '__main__':
7+
unittest.main()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import unittest
2+
from test._test_multiprocessing import install_tests_in_module_dict
3+
4+
install_tests_in_module_dict(globals(), 'forkserver', only_type="processes")
5+
6+
if __name__ == '__main__':
7+
unittest.main()

0 commit comments

Comments
 (0)