mirror of https://github.com/python/cpython.git
Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
This commit is contained in:
commit
a84a7cb06b
|
@ -2404,7 +2404,7 @@ def test_issue16955(self):
|
||||||
c.close()
|
c.close()
|
||||||
l.close()
|
l.close()
|
||||||
|
|
||||||
class _TestPoll(unittest.TestCase):
|
class _TestPoll(BaseTestCase):
|
||||||
|
|
||||||
ALLOWED_TYPES = ('processes', 'threads')
|
ALLOWED_TYPES = ('processes', 'threads')
|
||||||
|
|
||||||
|
@ -3585,16 +3585,7 @@ def test_ignore_listener(self):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
testcases_other = [OtherTest, TestInvalidHandle, TestInitializers,
|
def setUpModule():
|
||||||
TestStdinBadfiledescriptor, TestWait, TestInvalidFamily,
|
|
||||||
TestFlags, TestTimeouts, TestNoForkBomb,
|
|
||||||
TestForkAwareThreadLock, TestIgnoreEINTR]
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
def test_main(run=None):
|
|
||||||
if sys.platform.startswith("linux"):
|
if sys.platform.startswith("linux"):
|
||||||
try:
|
try:
|
||||||
lock = multiprocessing.RLock()
|
lock = multiprocessing.RLock()
|
||||||
|
@ -3603,26 +3594,10 @@ def test_main(run=None):
|
||||||
|
|
||||||
check_enough_semaphores()
|
check_enough_semaphores()
|
||||||
|
|
||||||
if run is None:
|
|
||||||
from test.support import run_unittest as run
|
|
||||||
|
|
||||||
util.get_temp_dir() # creates temp directory for use by all processes
|
util.get_temp_dir() # creates temp directory for use by all processes
|
||||||
|
|
||||||
multiprocessing.get_logger().setLevel(LOG_LEVEL)
|
multiprocessing.get_logger().setLevel(LOG_LEVEL)
|
||||||
|
|
||||||
testcases = (
|
|
||||||
sorted(testcases_processes.values(), key=lambda tc:tc.__name__) +
|
|
||||||
sorted(testcases_threads.values(), key=lambda tc:tc.__name__) +
|
|
||||||
sorted(testcases_manager.values(), key=lambda tc:tc.__name__) +
|
|
||||||
testcases_other
|
|
||||||
)
|
|
||||||
|
|
||||||
loadTestsFromTestCase = unittest.defaultTestLoader.loadTestsFromTestCase
|
|
||||||
suite = unittest.TestSuite(loadTestsFromTestCase(tc) for tc in testcases)
|
|
||||||
run(suite)
|
|
||||||
|
|
||||||
def main():
|
|
||||||
test_main(unittest.TextTestRunner(verbosity=2).run)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
unittest.main()
|
||||||
|
|
10
Misc/NEWS
10
Misc/NEWS
|
@ -156,9 +156,13 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- Issue #18393: The private module _gestalt and private functions platform._mac_ver_gestalt,
|
- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
|
||||||
platform._mac_ver_lookup and platform._bcd2str have been removed. This does not
|
Zachary Ware.)
|
||||||
affect the public interface of the platform module.
|
|
||||||
|
- Issue #18393: The private module _gestalt and private functions
|
||||||
|
platform._mac_ver_gestalt, platform._mac_ver_lookup and
|
||||||
|
platform._bcd2str have been removed. This does not affect the public
|
||||||
|
interface of the platform module.
|
||||||
|
|
||||||
- Issue #17482: functools.update_wrapper (and functools.wraps) now set the
|
- Issue #17482: functools.update_wrapper (and functools.wraps) now set the
|
||||||
__wrapped__ attribute correctly even if the underlying function has a
|
__wrapped__ attribute correctly even if the underlying function has a
|
||||||
|
|
Loading…
Reference in New Issue