lib-python/3/test/test_threading.py::unmodified
== PyPy 3.12.13 (a3c6b428e7a8, Jul 09 2026, 04:18:51) [PyPy 8.0.0-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
== Linux-6.1.0-22-amd64-x86_64-with-glibc2.17 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_1012739æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network
Using random seed: 1878428632
0:00:00 load avg: 0.73 Run 1 test sequentially in a single process
0:00:00 load avg: 0.73 [1/1] test_threading
test_atexit_after_shutdown (test.test_threading.AtexitTests.test_atexit_after_shutdown) ... ok
test_atexit_called_once (test.test_threading.AtexitTests.test_atexit_called_once) ... FAIL
test_atexit_output (test.test_threading.AtexitTests.test_atexit_output) ... ok
test_abort (test.test_threading.BarrierTests.test_abort)
Test that an abort will put the barrier in a broken state ... ok
test_abort_and_reset (test.test_threading.BarrierTests.test_abort_and_reset)
Test that a barrier can be reset after being broken. ... ok
test_action (test.test_threading.BarrierTests.test_action)
Test the 'action' callback ... ok
test_barrier (test.test_threading.BarrierTests.test_barrier)
Test that a barrier is passed in lockstep ... ok
test_barrier_10 (test.test_threading.BarrierTests.test_barrier_10)
Test that a barrier works for 10 consecutive runs ... ok
test_constructor (test.test_threading.BarrierTests.test_constructor) ... ok
test_default_timeout (test.test_threading.BarrierTests.test_default_timeout)
Test the barrier's default timeout ... ok
test_repr (test.test_threading.BarrierTests.test_repr) ... ok
test_reset (test.test_threading.BarrierTests.test_reset)
Test that a 'reset' on a barrier frees the waiting threads ... ok
test_single_thread (test.test_threading.BarrierTests.test_single_thread) ... ok
test_timeout (test.test_threading.BarrierTests.test_timeout)
Test wait(timeout) ... ok
test_wait_return (test.test_threading.BarrierTests.test_wait_return)
test the return value from barrier.wait ... ok
test_acquire (test.test_threading.BoundedSemaphoreTests.test_acquire) ... ok
test_acquire_contended (test.test_threading.BoundedSemaphoreTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.BoundedSemaphoreTests.test_acquire_destroy) ... ok
test_acquire_timeout (test.test_threading.BoundedSemaphoreTests.test_acquire_timeout) ... ok
test_constructor (test.test_threading.BoundedSemaphoreTests.test_constructor) ... ok
test_default_value (test.test_threading.BoundedSemaphoreTests.test_default_value) ... ok
test_multirelease (test.test_threading.BoundedSemaphoreTests.test_multirelease) ... ok
test_release_unacquired (test.test_threading.BoundedSemaphoreTests.test_release_unacquired) ... ok
test_repr (test.test_threading.BoundedSemaphoreTests.test_repr) ... ok
test_try_acquire (test.test_threading.BoundedSemaphoreTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.BoundedSemaphoreTests.test_try_acquire_contended) ... ok
test_with (test.test_threading.BoundedSemaphoreTests.test_with) ... ok
test__is_owned (test.test_threading.CRLockTests.test__is_owned) ... ok
test_acquire_contended (test.test_threading.CRLockTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.CRLockTests.test_acquire_destroy) ... ok
test_acquire_release (test.test_threading.CRLockTests.test_acquire_release) ... ok
test_constructor (test.test_threading.CRLockTests.test_constructor) ... ok
test_different_thread (test.test_threading.CRLockTests.test_different_thread) ... ok
test_locked_repr (test.test_threading.CRLockTests.test_locked_repr) ... ok
test_reacquire (test.test_threading.CRLockTests.test_reacquire) ... ok
test_recursion_count (test.test_threading.CRLockTests.test_recursion_count) ... ok
test_release_save_unacquired (test.test_threading.CRLockTests.test_release_save_unacquired) ... ok
test_release_unacquired (test.test_threading.CRLockTests.test_release_unacquired) ... ok
test_repr (test.test_threading.CRLockTests.test_repr) ... ok
test_thread_leak (test.test_threading.CRLockTests.test_thread_leak) ... ok
test_timeout (test.test_threading.CRLockTests.test_timeout) ... ok
test_try_acquire (test.test_threading.CRLockTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.CRLockTests.test_try_acquire_contended) ... ok
test_weakref_deleted (test.test_threading.CRLockTests.test_weakref_deleted) ... ok
test_weakref_exists (test.test_threading.CRLockTests.test_weakref_exists) ... ok
test_with (test.test_threading.CRLockTests.test_with) ... ok
test__is_owned (test.test_threading.ConditionAsRLockTests.test__is_owned) ... ok
test_acquire_contended (test.test_threading.ConditionAsRLockTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.ConditionAsRLockTests.test_acquire_destroy) ... ok
test_acquire_release (test.test_threading.ConditionAsRLockTests.test_acquire_release) ... ok
test_constructor (test.test_threading.ConditionAsRLockTests.test_constructor) ... ok
test_different_thread (test.test_threading.ConditionAsRLockTests.test_different_thread) ... ok
test_locked_repr (test.test_threading.ConditionAsRLockTests.test_locked_repr) ... ok
test_reacquire (test.test_threading.ConditionAsRLockTests.test_reacquire) ... ok
test_recursion_count (test.test_threading.ConditionAsRLockTests.test_recursion_count) ... skipped 'Condition does not expose _recursion_count()'
test_release_save_unacquired (test.test_threading.ConditionAsRLockTests.test_release_save_unacquired) ... ok
test_release_unacquired (test.test_threading.ConditionAsRLockTests.test_release_unacquired) ... ok
test_repr (test.test_threading.ConditionAsRLockTests.test_repr) ... ok
test_thread_leak (test.test_threading.ConditionAsRLockTests.test_thread_leak) ... ok
test_timeout (test.test_threading.ConditionAsRLockTests.test_timeout) ... ok
test_try_acquire (test.test_threading.ConditionAsRLockTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.ConditionAsRLockTests.test_try_acquire_contended) ... ok
test_weakref_deleted (test.test_threading.ConditionAsRLockTests.test_weakref_deleted) ... ok
test_weakref_exists (test.test_threading.ConditionAsRLockTests.test_weakref_exists) ... ok
test_with (test.test_threading.ConditionAsRLockTests.test_with) ... ok
test_acquire (test.test_threading.ConditionTests.test_acquire) ... ok
test_notify (test.test_threading.ConditionTests.test_notify) ... ok
test_timeout (test.test_threading.ConditionTests.test_timeout) ... ok
test_unacquired_notify (test.test_threading.ConditionTests.test_unacquired_notify) ... ok
test_unacquired_wait (test.test_threading.ConditionTests.test_unacquired_wait) ... ok
test_waitfor (test.test_threading.ConditionTests.test_waitfor) ... ok
test_waitfor_timeout (test.test_threading.ConditionTests.test_waitfor_timeout) ... ok
test_at_fork_reinit (test.test_threading.EventTests.test_at_fork_reinit) ... ok
test_is_set (test.test_threading.EventTests.test_is_set) ... ok
test_notify (test.test_threading.EventTests.test_notify) ... ok
test_repr (test.test_threading.EventTests.test_repr) ... ok
test_set_and_clear (test.test_threading.EventTests.test_set_and_clear) ... ok
test_timeout (test.test_threading.EventTests.test_timeout) ... ok
test_custom_excepthook (test.test_threading.ExceptHookTests.test_custom_excepthook) ... ok
test_custom_excepthook_fail (test.test_threading.ExceptHookTests.test_custom_excepthook_fail) ... ok
test_excepthook (test.test_threading.ExceptHookTests.test_excepthook) ... ok
test_excepthook_thread_None (test.test_threading.ExceptHookTests.test_excepthook_thread_None) ... skipped 'implementation detail specific to cpython'
test_original_excepthook (test.test_threading.ExceptHookTests.test_original_excepthook) ... ok
test_system_exit (test.test_threading.ExceptHookTests.test_system_exit) ... ok
test_can_interrupt_tight_loops (test.test_threading.InterruptMainTests.test_can_interrupt_tight_loops) ... ok
test_interrupt_main_invalid_signal (test.test_threading.InterruptMainTests.test_interrupt_main_invalid_signal) ... ok
test_interrupt_main_mainthread (test.test_threading.InterruptMainTests.test_interrupt_main_mainthread) ... ok
test_interrupt_main_noerror (test.test_threading.InterruptMainTests.test_interrupt_main_noerror) ... ok
test_interrupt_main_subthread (test.test_threading.InterruptMainTests.test_interrupt_main_subthread) ... ok
test_interrupt_main_with_signal_handler (test.test_threading.InterruptMainTests.test_interrupt_main_with_signal_handler) ... ok
test_acquire_contended (test.test_threading.LockTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.LockTests.test_acquire_destroy) ... ok
test_acquire_release (test.test_threading.LockTests.test_acquire_release) ... ok
test_at_fork_reinit (test.test_threading.LockTests.test_at_fork_reinit) ... ok
test_constructor (test.test_threading.LockTests.test_constructor) ... ok
test_different_thread (test.test_threading.LockTests.test_different_thread) ... ok
test_locked_repr (test.test_threading.LockTests.test_locked_repr) ... ok
test_reacquire (test.test_threading.LockTests.test_reacquire) ... ok
test_repr (test.test_threading.LockTests.test_repr) ... ok
test_state_after_timeout (test.test_threading.LockTests.test_state_after_timeout) ... ok
test_thread_leak (test.test_threading.LockTests.test_thread_leak) ... ok
test_timeout (test.test_threading.LockTests.test_timeout) ... ok
test_try_acquire (test.test_threading.LockTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.LockTests.test_try_acquire_contended) ... ok
test_weakref_deleted (test.test_threading.LockTests.test_weakref_deleted) ... ok
test_weakref_exists (test.test_threading.LockTests.test_weakref_exists) ... ok
test_with (test.test_threading.LockTests.test_with) ... ok
test__all__ (test.test_threading.MiscTestCase.test__all__) ... ok
test_gh112826_missing__thread__is_main_interpreter (test.test_threading.MiscTestCase.test_gh112826_missing__thread__is_main_interpreter) ... FAIL
test__is_owned (test.test_threading.PyRLockTests.test__is_owned) ... ok
test_acquire_contended (test.test_threading.PyRLockTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.PyRLockTests.test_acquire_destroy) ... ok
test_acquire_release (test.test_threading.PyRLockTests.test_acquire_release) ... ok
test_constructor (test.test_threading.PyRLockTests.test_constructor) ... ok
test_different_thread (test.test_threading.PyRLockTests.test_different_thread) ... ok
test_locked_repr (test.test_threading.PyRLockTests.test_locked_repr) ... ok
test_reacquire (test.test_threading.PyRLockTests.test_reacquire) ... ok
test_recursion_count (test.test_threading.PyRLockTests.test_recursion_count) ... ok
test_release_save_unacquired (test.test_threading.PyRLockTests.test_release_save_unacquired) ... ok
test_release_unacquired (test.test_threading.PyRLockTests.test_release_unacquired) ... ok
test_repr (test.test_threading.PyRLockTests.test_repr) ... ok
test_thread_leak (test.test_threading.PyRLockTests.test_thread_leak) ... ok
test_timeout (test.test_threading.PyRLockTests.test_timeout) ... ok
test_try_acquire (test.test_threading.PyRLockTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.PyRLockTests.test_try_acquire_contended) ... ok
test_weakref_deleted (test.test_threading.PyRLockTests.test_weakref_deleted) ... ok
test_weakref_exists (test.test_threading.PyRLockTests.test_weakref_exists) ... ok
test_with (test.test_threading.PyRLockTests.test_with) ... ok
test_acquire (test.test_threading.SemaphoreTests.test_acquire) ... ok
test_acquire_contended (test.test_threading.SemaphoreTests.test_acquire_contended) ... ok
test_acquire_destroy (test.test_threading.SemaphoreTests.test_acquire_destroy) ... ok
test_acquire_timeout (test.test_threading.SemaphoreTests.test_acquire_timeout) ... ok
test_constructor (test.test_threading.SemaphoreTests.test_constructor) ... ok
test_default_value (test.test_threading.SemaphoreTests.test_default_value) ... ok
test_multirelease (test.test_threading.SemaphoreTests.test_multirelease) ... ok
test_release_unacquired (test.test_threading.SemaphoreTests.test_release_unacquired) ... ok
test_repr (test.test_threading.SemaphoreTests.test_repr) ... ok
test_try_acquire (test.test_threading.SemaphoreTests.test_try_acquire) ... ok
test_try_acquire_contended (test.test_threading.SemaphoreTests.test_try_acquire_contended) ... ok
test_with (test.test_threading.SemaphoreTests.test_with) ... ok
test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests.test_daemon_threads_fatal_error) ... skipped 'implementation detail specific to cpython'
test_daemon_threads_not_allowed (test.test_threading.SubinterpThreadingTests.test_daemon_threads_not_allowed) ... skipped 'implementation detail specific to cpython'
test_threads_join (test.test_threading.SubinterpThreadingTests.test_threads_join) ... skipped 'implementation detail specific to cpython'
test_threads_join_2 (test.test_threading.SubinterpThreadingTests.test_threads_join_2) ... skipped 'implementation detail specific to cpython'
test_threads_join_with_no_main (test.test_threading.SubinterpThreadingTests.test_threads_join_with_no_main) ... skipped 'subinterpreters required'
test_threads_not_allowed (test.test_threading.SubinterpThreadingTests.test_threads_not_allowed) ... skipped 'implementation detail specific to cpython'
test_1_join_on_shutdown (test.test_threading.ThreadJoinOnShutdown.test_1_join_on_shutdown) ... ok
test_2_join_in_forked_process (test.test_threading.ThreadJoinOnShutdown.test_2_join_in_forked_process) ... ok
test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown.test_3_join_in_forked_from_thread) ... ok
test_4_daemon_threads (test.test_threading.ThreadJoinOnShutdown.test_4_daemon_threads) ... ok
test_clear_threads_states_after_fork (test.test_threading.ThreadJoinOnShutdown.test_clear_threads_states_after_fork) ... ok
test_reinit_tls_after_fork (test.test_threading.ThreadJoinOnShutdown.test_reinit_tls_after_fork) ... ok
test_thread_from_thread (test.test_threading.ThreadJoinOnShutdown.test_thread_from_thread) ... ok
test_BoundedSemaphore_limit (test.test_threading.ThreadTests.test_BoundedSemaphore_limit) ... ok
test_PyThreadState_SetAsyncExc (test.test_threading.ThreadTests.test_PyThreadState_SetAsyncExc) ... skipped 'implementation detail specific to cpython'
test_args_argument (test.test_threading.ThreadTests.test_args_argument) ... ok
test_boolean_target (test.test_threading.ThreadTests.test_boolean_target) ... ok
test_daemon_param (test.test_threading.ThreadTests.test_daemon_param) ... ok
test_disallow_instantiation (test.test_threading.ThreadTests.test_disallow_instantiation) ... skipped 'implementation detail specific to cpython'
test_dummy_thread_after_fork (test.test_threading.ThreadTests.test_dummy_thread_after_fork) ... FAIL
test_enumerate_after_join (test.test_threading.ThreadTests.test_enumerate_after_join) ... ok
test_finalization_shutdown (test.test_threading.ThreadTests.test_finalization_shutdown) ... ok
test_finalize_running_thread (test.test_threading.ThreadTests.test_finalize_running_thread) ... skipped 'implementation detail specific to cpython'
test_finalize_with_trace (test.test_threading.ThreadTests.test_finalize_with_trace) ... ok
test_foreign_thread (test.test_threading.ThreadTests.test_foreign_thread) ... ok
test_frame_tstate_tracing (test.test_threading.ThreadTests.test_frame_tstate_tracing) ... skipped 'implementation detail specific to cpython'
test_getprofile (test.test_threading.ThreadTests.test_getprofile) ... ok
test_getprofile_all_threads (test.test_threading.ThreadTests.test_getprofile_all_threads) ... ok
test_gettrace (test.test_threading.ThreadTests.test_gettrace) ... ok
test_gettrace_all_threads (test.test_threading.ThreadTests.test_gettrace_all_threads) ... ok
test_ident_of_no_threading_threads (test.test_threading.ThreadTests.test_ident_of_no_threading_threads) ... ok
test_import_from_another_thread (test.test_threading.ThreadTests.test_import_from_another_thread) ... ok
test_is_alive_after_fork (test.test_threading.ThreadTests.test_is_alive_after_fork) ... ok
test_join_nondaemon_on_shutdown (test.test_threading.ThreadTests.test_join_nondaemon_on_shutdown) ... ok
test_leak_without_join (test.test_threading.ThreadTests.test_leak_without_join) ... ok
test_limbo_cleanup (test.test_threading.ThreadTests.test_limbo_cleanup) ... ok
test_locals_at_exit (test.test_threading.ThreadTests.test_locals_at_exit) ... skipped 'implementation detail specific to cpython'
test_main_thread (test.test_threading.ThreadTests.test_main_thread) ... ok
test_main_thread_after_fork (test.test_threading.ThreadTests.test_main_thread_after_fork) ... ok
test_main_thread_after_fork_from_dummy_thread (test.test_threading.ThreadTests.test_main_thread_after_fork_from_dummy_thread) ... ok
test_main_thread_after_fork_from_foreign_thread (test.test_threading.ThreadTests.test_main_thread_after_fork_from_foreign_thread) ... ok
test_main_thread_after_fork_from_nonmain_thread (test.test_threading.ThreadTests.test_main_thread_after_fork_from_nonmain_thread) ... FAIL
test_main_thread_during_shutdown (test.test_threading.ThreadTests.test_main_thread_during_shutdown) ... skipped 'implementation detail specific to cpython'
test_name (test.test_threading.ThreadTests.test_name) ... skipped 'implementation detail specific to cpython'
test_no_refcycle_through_target (test.test_threading.ThreadTests.test_no_refcycle_through_target) ... skipped 'implementation detail specific to cpython'
test_old_threading_api (test.test_threading.ThreadTests.test_old_threading_api) ... ok
test_repr_daemon (test.test_threading.ThreadTests.test_repr_daemon) ... ok
test_repr_stopped (test.test_threading.ThreadTests.test_repr_stopped) ... ok
test_shutdown_locks (test.test_threading.ThreadTests.test_shutdown_locks) ... skipped 'implementation detail specific to cpython'
test_start_new_thread_at_finalization (test.test_threading.ThreadTests.test_start_new_thread_at_finalization) ... FAIL
test_start_new_thread_failed (test.test_threading.ThreadTests.test_start_new_thread_failed) ... ok
test_tstate_lock (test.test_threading.ThreadTests.test_tstate_lock) ... ok
test_various_ops (test.test_threading.ThreadTests.test_various_ops) ... task <thread 0> will run for 35.5 usec
1 tasks are running
task <thread 0> done
<thread 0> is finished. 0 tasks are running
task <thread 1> will run for 19.2 usec
1 tasks are running
task <thread 1> done
<thread 1> is finished. 0 tasks are running
task <thread 2> will run for 99.4 usec
1 tasks are running
task <thread 3> will run for 14.7 usec
2 tasks are running
task <thread 2> done
<thread 2> is finished. 1 tasks are running
task <thread 3> done
<thread 3> is finished. 0 tasks are running
task <thread 4> will run for 12.5 usec
1 tasks are running
task <thread 4> done
<thread 4> is finished. 0 tasks are running
task <thread 5> will run for 47.7 usec
1 tasks are running
task <thread 5> done
<thread 5> is finished. 0 tasks are running
task <thread 6> will run for 38.1 usec
1 tasks are running
task <thread 6> done
<thread 6> is finished. 0 tasks are running
task <thread 7> will run for 43.9 usec
1 tasks are running
task <thread 7> done
<thread 7> is finished. 0 tasks are running
task <thread 8> will run for 98.4 usec
1 tasks are running
task <thread 8> done
<thread 8> is finished. 0 tasks are running
task <thread 9> will run for 50.8 usec
1 tasks are running
task <thread 9> done
<thread 9> is finished. 0 tasks are running
waiting for all tasks to complete
all tasks done
ok
test_various_ops_large_stack (test.test_threading.ThreadTests.test_various_ops_large_stack) ... with 1 MiB thread stack size...
task <thread 0> will run for 26.0 usec
1 tasks are running
task <thread 0> done
<thread 0> is finished. 0 tasks are running
task <thread 1> will run for 2.3 usec
1 tasks are running
task <thread 1> done
<thread 1> is finished. 0 tasks are running
task <thread 2> will run for 73.6 usec
1 tasks are running
task <thread 2> done
<thread 2> is finished. 0 tasks are running
task <thread 3> will run for 36.9 usec
1 tasks are running
task <thread 4> will run for 94.5 usec
2 tasks are running
task <thread 3> done
<thread 3> is finished. 1 tasks are running
task <thread 4> done
<thread 4> is finished. 0 tasks are running
task <thread 5> will run for 31.0 usec
1 tasks are running
task <thread 5> done
<thread 5> is finished. 0 tasks are running
task <thread 6> will run for 51.5 usec
1 tasks are running
task <thread 6> done
<thread 6> is finished. 0 tasks are running
task <thread 7> will run for 97.5 usec
1 tasks are running
task <thread 7> done
<thread 7> is finished. 0 tasks are running
task <thread 8> will run for 30.8 usec
1 tasks are running
task <thread 8> done
<thread 8> is finished. 0 tasks are running
task <thread 9> will run for 14.3 usec
1 tasks are running
waiting for all tasks to complete
task <thread 9> done
<thread 9> is finished. 0 tasks are running
all tasks done
ok
test_various_ops_small_stack (test.test_threading.ThreadTests.test_various_ops_small_stack) ... with 256 KiB thread stack size...
task <thread 0> will run for 40.4 usec
1 tasks are running
task <thread 0> done
<thread 0> is finished. 0 tasks are running
task <thread 1> will run for 1.7 usec
task <thread 2> will run for 85.1 usec
1 tasks are running
task <thread 1> done
<thread 1> is finished. 0 tasks are running
task <thread 3> will run for 97.6 usec
1 tasks are running
task <thread 4> will run for 35.6 usec
2 tasks are running
3 tasks are running
task <thread 4> done
<thread 4> is finished. 2 tasks are running
task <thread 2> done
<thread 2> is finished. 1 tasks are running
task <thread 3> done
<thread 3> is finished. 0 tasks are running
task <thread 5> will run for 54.3 usec
1 tasks are running
task <thread 5> done
<thread 5> is finished. 0 tasks are running
task <thread 6> will run for 65.2 usec
1 tasks are running
task <thread 7> will run for 62.5 usec
2 tasks are running
task <thread 6> done
<thread 6> is finished. 1 tasks are running
task <thread 7> done
<thread 7> is finished. 0 tasks are running
task <thread 8> will run for 31.1 usec
1 tasks are running
task <thread 8> done
<thread 8> is finished. 0 tasks are running
task <thread 9> will run for 53.8 usec
1 tasks are running
waiting for all tasks to complete
task <thread 9> done
<thread 9> is finished. 0 tasks are running
all tasks done
ok
test_bare_raise_in_brand_new_thread (test.test_threading.ThreadingExceptionTests.test_bare_raise_in_brand_new_thread) ... ok
test_daemonize_active_thread (test.test_threading.ThreadingExceptionTests.test_daemonize_active_thread) ... ok
test_joining_current_thread (test.test_threading.ThreadingExceptionTests.test_joining_current_thread) ... ok
test_joining_inactive_thread (test.test_threading.ThreadingExceptionTests.test_joining_inactive_thread) ... ok
test_multithread_modify_file_noerror (test.test_threading.ThreadingExceptionTests.test_multithread_modify_file_noerror) ... ok
test_print_exception (test.test_threading.ThreadingExceptionTests.test_print_exception) ... ok
test_print_exception_gh_102056 (test.test_threading.ThreadingExceptionTests.test_print_exception_gh_102056) ... ok
test_print_exception_stderr_is_none_1 (test.test_threading.ThreadingExceptionTests.test_print_exception_stderr_is_none_1) ... ok
test_print_exception_stderr_is_none_2 (test.test_threading.ThreadingExceptionTests.test_print_exception_stderr_is_none_2) ... ok
test_recursion_limit (test.test_threading.ThreadingExceptionTests.test_recursion_limit) ... ok
test_releasing_unacquired_lock (test.test_threading.ThreadingExceptionTests.test_releasing_unacquired_lock) ... ok
test_start_thread_again (test.test_threading.ThreadingExceptionTests.test_start_thread_again) ... ok
test_init_immutable_default_args (test.test_threading.TimerTests.test_init_immutable_default_args) ... ok
======================================================================
FAIL: test_atexit_called_once (test.test_threading.AtexitTests.test_atexit_called_once)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_threading.py", line 2119, in test_atexit_called_once
rc, out, err = assert_python_ok("-c", """if True:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 166, in assert_python_ok
return _assert_python(True, *args, **env_vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 151, in _assert_python
res.fail(cmd_line)
^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 76, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/build_dir/pypy-c-jit-linux-x86-64/build/pypy/goal/pypy3.12-c', '-X', 'faulthandler', '-I', '-c', 'if True:\n import threading\n from unittest.mock import Mock\n\n mock = Mock()\n threading._register_atexit(mock)\n mock.assert_not_called()\n # force early shutdown to ensure it was called once\n threading._shutdown()\n mock.assert_called_once()\n ']
stdout:
---
---
stderr:
---
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/threading.py", line 1572, in _register_atexit
call = functools.partial(func, *arg, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/functools.py", line 290, in __new__
args = func.args + args
~~~~~~~~~~^~~~~~
TypeError: unsupported operand type(s) for +: 'Mock' and 'tuple'
---
======================================================================
FAIL: test_gh112826_missing__thread__is_main_interpreter (test.test_threading.MiscTestCase.test_gh112826_missing__thread__is_main_interpreter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_threading.py", line 2008, in test_gh112826_missing__thread__is_main_interpreter
_, out, err = assert_python_ok("-c", f"""if True:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 166, in assert_python_ok
return _assert_python(True, *args, **env_vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 151, in _assert_python
res.fail(cmd_line)
^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 76, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/build_dir/pypy-c-jit-linux-x86-64/build/pypy/goal/pypy3.12-c', '-X', 'faulthandler', '-I', '-c', "if True:\n import sys\n sys.path.insert(0, '/tmp/pytest/tmp5l3nyql2')\n import _thread_fake\n sys.modules['_thread'] = _thread_fake\n del sys.modules['_thread_fake']\n\n import threading\n print('success!', end='')\n "]
stdout:
---
---
stderr:
---
Traceback (most recent call last):
File "<string>", line 4, in <module>
File "/tmp/pytest/tmp5l3nyql2/_thread_fake.py", line 4, in <module>
del _is_main_interpreter
^^^^^^^^^^^^^^^^^^^^
NameError: name '_is_main_interpreter' is not defined
---
======================================================================
FAIL: test_dummy_thread_after_fork (test.test_threading.ThreadTests.test_dummy_thread_after_fork)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_threading.py", line 598, in test_dummy_thread_after_fork
_, out, err = assert_python_ok("-c", code)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 166, in assert_python_ok
return _assert_python(True, *args, **env_vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 151, in _assert_python
res.fail(cmd_line)
^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/script_helper.py", line 76, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/build_dir/pypy-c-jit-linux-x86-64/build/pypy/goal/pypy3.12-c', '-X', 'faulthandler', '-I', '-c', 'if 1:\n import _thread, threading, os, time, warnings\n\n def background_thread(evt):\n # Creates and registers the _DummyThread instance\n threading.current_thread()\n evt.set()\n time.sleep(10)\n\n evt = threading.Event()\n _thread.start_new_thread(background_thread, (evt,))\n evt.wait()\n assert threading.active_count() == 2, threading.active_count()\n with warnings.catch_warnings(record=True) as ws:\n warnings.filterwarnings(\n "always", category=DeprecationWarning)\n if os.fork() == 0:\n assert threading.active_count() == 1, threading.active_count()\n os._exit(0)\n else:\n assert ws[0].category == DeprecationWarning, ws[0]\n assert \'fork\' in str(ws[0].message), ws[0]\n os.wait()\n ']
stdout:
---
---
stderr:
---
Traceback (most recent call last):
File "<string>", line 21, in <module>
IndexError: list index out of range
---
======================================================================
FAIL: test_main_thread_after_fork_from_nonmain_thread (test.test_threading.ThreadTests.test_main_thread_after_fork_from_nonmain_thread)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_threading.py", line 698, in test_main_thread_after_fork_from_nonmain_thread
self.assertEqual(err.decode('utf-8'), "")
^^^^^^^^^^^
AssertionError: 'Exception in thread Thread-1 (func):\nTra[385 chars]ge\n' != ''
- Exception in thread Thread-1 (func):
- Traceback (most recent call last):
- File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/threading.py", line 1075, in _bootstrap_inner
- self.run()
- ^^^
- File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/threading.py", line 1012, in run
- self._target(*self._args, **self._kwargs)
- File "<string>", line 21, in func
- IndexError: list index out of range
======================================================================
FAIL: test_start_new_thread_at_finalization (test.test_threading.ThreadTests.test_start_new_thread_at_finalization)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_threading.py", line 1155, in test_start_new_thread_at_finalization
self.assertEqual(out.strip(), b"OK")
^^^^^^^^^^^
AssertionError: b'' != b'OK'
----------------------------------------------------------------------
Ran 208 tests in 19.736s
FAILED (failures=5, skipped=17)
0:00:19 load avg: 0.58 [1/1/1] test_threading failed (5 failures)
== Tests result: FAILURE ==
1 test failed:
test_threading
Total duration: 19.9 sec
Total tests: run=208 failures=5 skipped=17
Total test files: run=1/1 failed=1
Result: FAILURE
test test_threading failed
builder: pypy-c-jit-linux-x86-64 build #11855+
test: lib-python/3/test/test_threading.py::unmodified