| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python315/Lib/test/__pycache__/ |
Upload File : |
R
>lqj� c �4 � ] PH s ] PHs] PHs] PHs] PHs] QHGs ] QHGsG s ] QHG
s
] QHGs Q Q\O 2 s
Q Q\O 2 s\O Q Q
\O 2 2 s\Q6X c \O$ 2 P! P! )� )�support)�SuppressCrashReport�
script_helper)� os_helper)�threading_helperc �( ` � \ sQ s]s n Q sQsU sP! )�GeneralTestc �` � [ O Q 2 o[ O U2 P! )z_test_atexit.py)r �findfiler �run_test_script)�self�scripts & �%C:\Python315\\Lib\test\test_atexit.py�test_general�GeneralTest.test_general s! � ��!�!�"3�4���%�%�f�-� � )�__name__�
__module__�__qualname__�__firstlineno__r �__static_attributes__�__classdictcell__��
__classdict__s @r r r s �� � �.� .r r c �\ ` � \ sQ s]s n Q sQ s\O 2 \O Q2 \
O \O Q2 Q 2 2 2 s
\O 2 Q 2 s\O 2 \
O \ \Q2 Q2 Q 2 2 sQ
sU sP! )�FunctionalTestc � � [ O Q 2 o[ O QU2 oU O UO
O
2 O 2 QQ,2 U O UO 2 P! )z�
import atexit
def f(msg):
print(msg)
atexit.register(f, "one")
atexit.register(f, "two")
�-c�two�one�
�textwrap�dedentr �assert_python_ok�assertEqual�out�decode�
splitlines�assertFalse�err�r �code�ress & r �
test_shutdown�FunctionalTest.test_shutdown sc � ���� �
�� �,�,�T�4�8����������)�4�4�6����G�������!r c � � [ O Q 2 o[ O QU2 oU O UO
O
2 O 2 QQ,2 U O UO 2 P! )a@
import sys
import atexit as atexit1
del sys.modules['atexit']
import atexit as atexit2
del sys.modules['atexit']
assert atexit2 is not atexit1
atexit1.register(print, "atexit1")
atexit2.register(print, "atexit2")
r �atexit2�atexit1r! r+ s & r �test_atexit_instances�$FunctionalTest.test_atexit_instances! sd � ���� �
�� �,�,�T�4�8����������)�4�4�6��I�8N�O�������!r �cpuzonly meaningful without the GILc �b � Q o[ O Q[ O U2 2 P! )a
from threading import Thread
def dummy():
pass
def thready():
for _ in range(100):
atexit.register(dummy)
atexit._clear()
atexit.register(dummy)
atexit.unregister(dummy)
atexit._run_exitfuncs()
threads = [Thread(target=thready) for _ in range(10)]
for thread in threads:
thread.start()
for thread in threads:
thread.join()
r )r r$ r"