403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.141
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:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_cmd_line_script.cpython-313.pyc
�

��i����h�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKJ
r
 SSKJrJrJr SSKJrJrJrJrJrJrJrJr \
R6r/SQrSr\4Sjr\S4S	jr\
R@"S
S\RB55r"Sr#\$S
:Xa\RJ"5 gg)�N)�support)�
import_helper�is_apple�	os_helper)�make_pkg�make_script�make_zip_pkg�make_zip_script�assert_python_ok�assert_python_failure�spawn_python�kill_python)�test1�test2�test3a�# Script may be run with optimisation enabled, so don't rely on assert
# statements being executed
def assertEqual(lhs, rhs):
    if lhs != rhs:
        raise AssertionError('%r != %r' % (lhs, rhs))
def assertIdentical(lhs, rhs):
    if lhs is not rhs:
        raise AssertionError('%r is not %r' % (lhs, rhs))
# Check basic code execution
result = ['Top level assignment']
def f():
    result.append('Lower level reference')
f()
assertEqual(result, ['Top level assignment', 'Lower level reference'])
# Check population of magic variables
assertEqual(__name__, '__main__')
from importlib.machinery import BuiltinImporter
_loader = __loader__ if __loader__ is BuiltinImporter else type(__loader__)
print('__loader__==%a' % _loader)
print('__file__==%a' % __file__)
print('__cached__==%a' % __cached__)
print('__package__==%r' % __package__)
# Check PEP 451 details
import os.path
if __package__ is not None:
    print('__main__ was located through the import system')
    assertIdentical(__spec__.loader, __loader__)
    expected_spec_name = os.path.splitext(os.path.basename(__file__))[0]
    if __package__:
        expected_spec_name = __package__ + "." + expected_spec_name
    assertEqual(__spec__.name, expected_spec_name)
    assertEqual(__spec__.parent, __package__)
    assertIdentical(__spec__.submodule_search_locations, None)
    assertEqual(__spec__.origin, __file__)
    if __spec__.cached is not None:
        assertEqual(__spec__.cached, __cached__)
# Check the sys module
import sys
assertIdentical(globals(), sys.modules[__name__].__dict__)
if __spec__ is not None:
    # XXX: We're not currently making __main__ available under its real name
    pass # assertIdentical(globals(), sys.modules[__spec__.name].__dict__)
from test import test_cmd_line_script
example_args_list = test_cmd_line_script.example_args
assertEqual(sys.argv[1:], example_args_list)
print('sys.argv[0]==%a' % sys.argv[0])
print('sys.path[0]==%a' % sys.path[0])
# Check the working directory
import os
print('cwd==%a' % os.getcwd())
c�H�[XU5n[R"5 U$�N)r�	importlib�invalidate_caches)�
script_dir�script_basename�source�	to_returns    �.C:\Python313\\Lib\test\test_cmd_line_script.py�_make_test_scriptrOs ���J��@�I�
���!����c�J�[XX#XE5n[R"5 U$r)r	rr)�zip_dir�zip_basename�pkg_namerr�depthrs       r�_make_test_zip_pkgr#Ts%���W�H�#�,�I�
���!��rc��\rSrSrSDSjrSS.SjrSS.SjrSrSr\	RSES	j5rSES
jrSESjr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&S%r'\	RS&5r(S'r)S(r*S)r+S*r,S+r-S,r.S-r/S.r0S/r1S0r2S1r3S2r4S3r5S4r6S5r7S6r8S7r9S8r:S9r;S:r<S;r=\>R~"\@R�R�S<5S=5\>R�"\DR�R�S>5=(a9 \@R�"S?5R�\@R�"S@5R�:HSA5SB55rISCrJg)F�CmdLineTest�\Nc
�8�[S:�a"[SU-5 [[U55 URUS5 SU-n
SU-nSU-nSU-n
SU-nU	c[R
"5n	S	U	-n[S:�a7[S
5 [U5 [U5 [U
5 [U5 UR
U
RS5U5 UR
URS5U5 UR
URS5U5 UR
U
RS5U5 [RR(d!UR
URS5U5 UR
URS5U5 g)NrzOutput from test script %r:rz__loader__==%az__file__==%az__package__==%rzsys.argv[0]==%azsys.path[0]==%azcwd==%azExpected output:�utf-8)�verbose�print�repr�assertEqual�os�getcwd�assertIn�encode�sys�flags�	safe_path)�self�script_name�	exit_code�data�
expected_file�expected_argv0�expected_path0�expected_package�expected_loader�expected_cwd�printed_loader�printed_file�printed_package�
printed_argv0�
printed_path0�printed_cwds                r�
_check_output�CmdLineTest._check_output^sV���Q�;��/�+�=�>��$�t�*������A�&�)�O�;��%�
�5��+�.>�>��)�N�:�
�)�N�:�
����9�9�;�L��,�.���Q�;��$�%��,���/�"��-� ��+���
�
�n�+�+�G�4�d�;��
�
�l�)�)�'�2�D�9��
�
�o�,�,�W�5�t�<��
�
�m�*�*�7�3�T�:��y�y�"�"��M�M�-�.�.�w�7��>��
�
�k�(�(��1�4�8r��cwdc���[U[5(aU/n/[R"5QUQUQ[Qn
[U
SUS.U	D6up�n
UR
XX�-UX4XVU5	 g)NF��
__isolated�__cwd)�
isinstance�strr�!optim_args_from_interpreter_flags�example_argsrrD)r4�script_exec_argsr8r9r:r;r<rG�cmd_line_switches�env_vars�run_args�rc�out�errs              r�
_check_script�CmdLineTest._check_script}s����&��,�,� 0�1��J�W�>�>�@�J�&�J�)9�J�<H�J��'�
�%�s�
�6>�
����	
���+���M�)�+�c�	Crc�0�[U[5(aU4nO[U5nXA-n[USUS.UD6upxn	[S:�a2[SU<S35 [[
U	55 [SU-5 URURS5U	5 g)NFrIrzOutput from test script �zExpected output: %rr()	rLrM�tuplerr)r*r+r/r0)
r4rP�expected_msgrGrQrRrSrTrUrVs
          r�_check_import_error�CmdLineTest._check_import_error�s����&��,�,� 0�2��$�%5�6��$�7��,�
�%�s�
�6>�
�����Q�;��,�-=�,A�q�,A�B�C��$�s�)���'�,�6�7��
�
�l�)�)�'�2�C�8rc��[SS5upn[[RR5RS5nUR
XB5 g)N�-czprint(__loader__)r()rr+r�	machinery�BuiltinImporterr0r/)r4rTrUrV�expecteds     r�test_dash_c_loader�CmdLineTest.test_dash_c_loader�s@��'��.A�B�����	�+�+�;�;�<�C�C�G�L���
�
�h�$rc�@�[5nURRS5 URR5 [	U5n[[RR5RS5nURX25 g![	U5nf=f)Nsprint(__loader__)
r()r
�stdin�write�flushrr+rrarbr0r/)r4�prUrcs    r�test_stdin_loader�CmdLineTest.test_stdin_loader�sq��
�N��	!�
�G�G�M�M�0�1�
�G�G�M�M�O��a�.�C��	�+�+�;�;�<�C�C�G�L���
�
�h�$���a�.�C�s�5B�
Bc#�# �U(a%[S[RS9nURnO$[S[RS9nUR
nUR
S5nUS:XaOUR5 M*Uv� [U5 UR5 g![U5 UR5 f=f7f)Nz-i)�stderr�s>>> )
r
�
subprocess�PIPErn�STDOUT�stdout�read�readliner�close)r4�separate_stderrrjrnr7s     r�interactive_python�CmdLineTest.interactive_python�s������T�*�/�/�:�A��X�X�F��T�*�*;�*;�<�A��X�X�F�
	���{�{�1�~���7�?�����!�	�
�G���N��L�L�N��
��N��L�L�N�s�AB?�/B�B?�B<�<B?c�4�URU5nURRS5 URR5 UR	SUR
R
5R55 SSS5 g!,(df   g=f)Ns
print('foo')
sfoo)rxrgrhrir,rsru�strip)r4rwrjs   r�check_repl_stdout_flush�#CmdLineTest.check_repl_stdout_flush�sb��
�
$�
$�_�
5��
�G�G�M�M�+�,�
�G�G�M�M�O����V�Q�X�X�%6�%6�%8�%>�%>�%@�A�6�
5�
5�s�A.B	�	
Bc�B�URU5nURRS5 URR5 U(aUROUR
nUR
SUR55 UR
SUR55 UR
SUR55 UR
SUR55 UR
SUR55 SSS5 g!,(df   g=f)Ns1/0
s
Traceback sFile "<stdin>"s1/0�    ~^~sZeroDivisionError)rxrgrhrirnrsr/ru)r4rwrjrns    r�check_repl_stderr_flush�#CmdLineTest.check_repl_stderr_flush�s���
�
$�
$�_�
5��
�G�G�M�M�(�#�
�G�G�M�M�O�!0�Q�X�X�a�h�h�F��M�M�-����):�;��M�M�+�V�_�_�->�?��M�M�&�&�/�/�"3�4��M�M�*�f�o�o�&7�8��M�M�.����0A�B�6�
5�
5�s�C5D�
Dc�$�UR5 gr�r|�r4s r�test_repl_stdout_flush�"CmdLineTest.test_repl_stdout_flush�����$�$�&rc�&�URS5 g�NTr�r�s r�&test_repl_stdout_flush_separate_stderr�2CmdLineTest.test_repl_stdout_flush_separate_stderr�����$�$�T�*rc�$�UR5 gr�r�r�s r�test_repl_stderr_flush�"CmdLineTest.test_repl_stderr_flush�r�rc�&�URS5 gr�r�r�s r�&test_repl_stderr_flush_separate_stderr�2CmdLineTest.test_repl_stderr_flush_separate_stderr�r�rc���[R"5n[US5nURX"UUS[R
RUS9 SSS5 g!,(df   g=f)N�script)r=�r�temp_dirrrWrra�SourceFileLoader�r4rr5s   r�test_basic_script�CmdLineTest.test_basic_script�sV��
�
�
�
!�Z�+�J��A�K����{��)�4�(�2�2�C�C�,6�
�
8�"�
!�
!�s�9A�
A&c	�p�[R"5nUR[RRU5U5 [
US5n[RRU5nURX2UUS[RR5 SSS5 g!,(df   g=f)Nr�)r�temp_cwd�
assertTruer-�path�isabsr�basenamerWrrar�)r4rr5�
relative_names    r�test_script_abspath�CmdLineTest.test_script_abspath�s����
�
�
!�Z��O�O�B�G�G�M�M�*�5�z�B�+�J��A�K��G�G�,�,�[�9�M����}�=�)�4�(�2�2�C�C�
E�"�
!�
!�s�BB'�'
B5c	�T�[R"5n[US5n[R"USS9 [
R"U5 [R"U5nURX3X1S[RR5 SSS5 g!,(df   g=f)Nr�T��doraise�
rr�r�
py_compile�compiler-�remover�make_legacy_pycrWrra�SourcelessFileLoader�r4rr5�pyc_files    r�test_script_compiled� CmdLineTest.test_script_compiled�sy��
�
�
�
!�Z�+�J��A�K����{�D�9��I�I�k�"�$�4�4�[�A�H����x�'�T�(�2�2�G�G�
I�"�
!�
!�s�A:B�
B'c	���[R"5n[US5nURXUUS[R
R5 SSS5 g!,(df   g=f)N�__main__rZr�r�s   r�test_directory�CmdLineTest.test_directory�sO��
�
�
�
!�Z�+�J�
�C�K����z�
�)�2�(�2�2�C�C�
E�"�
!�
!�s�:A�
A'c	�V�[R"5n[US5n[R"USS9 [
R"U5 [R"U5nURXUUS[RR5 SSS5 g!,(df   g=f)Nr�Tr�rZr�r�s    r�test_directory_compiled�#CmdLineTest.test_directory_compileds{��
�
�
�
!�Z�+�J�
�C�K����{�D�9��I�I�k�"�$�4�4�[�A�H����z�Z�)�2�(�2�2�G�G�
I�"�
!�
!�s�A;B�
B(c��[R"5nSU-nURX5 SSS5 g!,(df   g=f)N�"can't find '__main__' module in %r)rr�r])r4r�msgs   r�test_directory_error� CmdLineTest.test_directory_errors4��
�
�
�
!�Z�6��C�C��$�$�Z�5�"�
!�
!�s	�6�
Ac	���[R"5n[US5n[USU5up4UR	X4X3S[
R5 SSS5 g!,(df   g=f)Nr��test_ziprZ)rr�rr
rW�	zipimport�zipimporter)r4rr5�zip_name�run_names     r�test_zipfile�CmdLineTest.test_zipfilesV��
�
�
�
!�Z�+�J�
�C�K�!0��Z��!U��H����x�8�r�(�4�4�
6�"�
!�
!�s�>A�
A+c	�8�[R"5n[US5n[R"US[R
RS9n[USU5upEURXEXDS[R5 SSS5 g!,(df   g=f�Nr�T)r��invalidation_moder�rZ)rr�rr�r��PycInvalidationMode�	TIMESTAMPr
rWr�r��r4rr5�
compiled_namer�r�s      r�test_zipfile_compiled_timestamp�+CmdLineTest.test_zipfile_compiled_timestamps}��
�
�
�
!�Z�+�J�
�C�K�&�.�.��T�",�"@�"@�"J�"J�L�M�"1��Z��!W��H����x�8�r�(�4�4�
6�
"�
!�
!���A,B�
Bc	�8�[R"5n[US5n[R"US[R
RS9n[USU5upEURXEXDS[R5 SSS5 g!,(df   g=fr�)rr�rr�r�r��CHECKED_HASHr
rWr�r�r�s      r�"test_zipfile_compiled_checked_hash�.CmdLineTest.test_zipfile_compiled_checked_hash$s}��
�
�
�
!�Z�+�J�
�C�K�&�.�.��T�",�"@�"@�"M�"M�O�M�"1��Z��!W��H����x�8�r�(�4�4�
6�
"�
!�
!�r�c	�8�[R"5n[US5n[R"US[R
RS9n[USU5upEURXEXDS[R5 SSS5 g!,(df   g=fr�)rr�rr�r�r��UNCHECKED_HASHr
rWr�r�r�s      r�$test_zipfile_compiled_unchecked_hash�0CmdLineTest.test_zipfile_compiled_unchecked_hash.s}��
�
�
�
!�Z�+�J�
�C�K�&�.�.��T�",�"@�"@�"O�"O�Q�M�"1��Z��!W��H����x�8�r�(�4�4�
6�
"�
!�
!�r�c���[R"5n[US5n[USU5up4SU-nUR	X55 SSS5 g!,(df   g=f)N�not_mainr�r�)rr�rr
r])r4rr5r�r�r�s      r�test_zipfile_error�CmdLineTest.test_zipfile_error8sQ��
�
�
�
!�Z�+�J�
�C�K�!0��Z��!U��H�6��A�C��$�$�X�3�	"�
!�
!�s�2A�
Ac�,�[R"5n[RR	US5n[U5 [
US5nURSS/X3US[RRUS9 SSS5 g!,(df   g=f)N�test_pkgr��-m�test_pkg.scriptrF�rr�r-r��joinrrrWrrar��r4r�pkg_dirr5s    r�test_module_in_package�"CmdLineTest.test_module_in_package?sx��
�
�
�
!�Z��g�g�l�l�:�z�:�G��W��+�G�X�>�K�����&7�8�+�)�:�(�2�2�C�C�#-�
�
/�	"�
!�
!���A&B�
Bc���[R"5n[USSS5up#URSS/X3US[R
X!S9 SSS5 g!,(df   g=f)Nr�r�r�r�r���
PYTHONPATHrG�rr�r#rWr�r��r4rr�r�s    r�!test_module_in_package_in_zipfile�-CmdLineTest.test_module_in_package_in_zipfileIs^��
�
�
�
!�Z�!3�J�
�J�X`�!a��H�����&7�8�(�)�:�y�7L�7L�*2�
�
D�"�
!�
!�s�5A�
A"c���[R"5n[USSSSS9up#URSS/X3US[R
X!S	9 SSS5 g!,(df   g=f)
Nr�r�r��)r"r�ztest_pkg.test_pkg.scriptztest_pkg.test_pkgr�r�r�s    r�$test_module_in_subpackage_in_zipfile�0CmdLineTest.test_module_in_subpackage_in_zipfilePsc��
�
�
�
!�Z�!3�J�
�J�X`�hi�!j��H�����&@�A�8�)�+>�(�4�4�*2�
�
D�"�
!�
!�s�4A�
A!c�,�[R"5n[RR	US5n[U5 [
US5nURSS/UX1S[RRUS9 SSS5 g!,(df   g=f)Nr�r�r�rFr�r�s    r�test_package�CmdLineTest.test_packageXsw��
�
�
�
!�Z��g�g�l�l�:�z�:�G��W��+�G�Z�@�K�����j�1�;�*�
�(�2�2�C�C�#-�
�
/�	"�
!�
!�r�c��[R"5n[RR	US5n[U5 [
US5n[R"USS9n[R"U5 [R"U5nURSS/UXQS[RRUS9 SSS5 g!,(df   g=f)Nr�r�Tr�r�rF)rr�r-r�r�rrr�r�r�rr�rWrrar�)r4rr�r5r�r�s      r�test_package_compiled�!CmdLineTest.test_package_compiledbs���
�
�
�
!�Z��g�g�l�l�:�z�:�G��W��+�G�Z�@�K�&�.�.�{�D�I�M��I�I�k�"�$�4�4�[�A�H�����j�1�8�'�Z�(�2�2�G�G�#-�
�
/�"�
!�
!�s�B'C�
Cc���[R"5n[RR	US5n[U5 SnUR
SS/X1S9 SSS5 g!,(df   g=f)Nr�z7'test_pkg' is a package and cannot be directly executedr�rF�rr�r-r�r�rr])r4rr�r�s    r�test_package_error�CmdLineTest.test_package_errorosW��
�
�
�
!�Z��g�g�l�l�:�z�:�G��W��*�C��$�$�d�J�%7��$�M�"�
!�
!�s�AA�
A-c�6�[R"5n[RR	US5n[U5 [RR	US5n[U5 SnUR
SS/XAS9 SSS5 g!,(df   g=f)Nr�r�z^Cannot use package as __main__ module; 'test_pkg' is a package and cannot be directly executedr�rFr�)r4rr��main_dirr�s     r�test_package_recursion�"CmdLineTest.test_package_recursionwsu��
�
�
�
!�Z��g�g�l�l�:�z�:�G��W���w�w�|�|�G�Z�8�H��X��*�C�
�$�$�d�J�%7��$�M�"�
!�
!�s�A+B
�

Bc�@�[R"5n[R"US9 [RRUS5n[
US5 [US5n[SS/[Q7SS06upEn[S	:�a[[U55 S
S-nURURS5U5 URX4UX3US[ R"R$5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)N�r�r�z1import sys; print('init_argv0==%r' % sys.argv[0])r�r�r�rJFrzinit_argv0==%rr()rr��
change_cwdr-r�r�rrrrOr)r*r+r/r0rDrrar�)r4rr�r5rTrUrVrcs        r�test_issue8202�CmdLineTest.test_issue8202�s����
�
�
!�Z��%�%�:�6��'�'�,�,�z�:�>����"U�V�/���B��/��6G�i�,�i�ch�i�����Q�;��$�s�)�$�+�d�2���
�
�h�o�o�g�6��<��"�"�;�C�#.�Z��#,�#6�#6�#G�#G�I�7�"�
!�6�6��"�
!�s#�D�CC>�-D�>
D	�D�
Dc	���[R"5n[R"US9 [SSSS9nUR	S5 [SSSS	9up4n[S
:�a[[U55 SS-nURURS5U5 SSS5 SSS5 SSS5 g!,(df   N=f!,(df   N(=f!,(df   g=f)
Nrr`�wr(��encodingr7z2import sys; print("sys.path[0]==%r" % sys.path[0])F)rJrzsys.path[0]==%rrZ)rr�r�openrhrr)r*r+r/r0)r4r�frTrUrVrcs       r�"test_issue8202_dash_c_file_ignored�.CmdLineTest.test_issue8202_dash_c_file_ignored�s����
�
�
!�Z��%�%�:�6��$��g�6�!��G�G�F�O�#3�D�L�#(�$*�L�B�S���{��d�3�i�(�0�2�5�H��M�M�(�/�/�'�":�C�@�7�7�"�
!�6�6��7�6��"�
!�s:�C�C�A$B4�C�#C�4
C�>C�
C	�C�
C$c
���[R"5n[US5n[R"US9 [	SSSS9nURS5 [
SS/[Q7SS	06upEnURX$UX"US
[RR5 SSS5 SSS5 SSS5 g!,(df   N=f!,(df   N(=f!,(df   g=f)N�otherrr�rr(rr7rJFrZ)rr�rrr	rhrrOrDrrar�)r4rr5r
rTrUrVs       r�"test_issue8202_dash_m_file_ignored�.CmdLineTest.test_issue8202_dash_m_file_ignored�s����
�
�
!�Z�+�J��@�K��%�%�:�6��$��g�6�!��G�G�F�O�#3�D�'�$F�L�$F�?D�$F�L�B�S��&�&�{��&1�
�B�&/�&9�&9�&J�&J�L�	7�7�"�
!�7�6��7�6��"�
!�s;�!C�C�AB3�C�"C�3
C�=C�
C	�C�
C#c�Z�[R"5n[RR	US5n[USSSS9nUR
S5 UR
S5 [S5HnUR
S	5 M UR
S5 SSS5 [R"US
9 [U5upVnSSS5 URSW5 URSW5 SSS5 g!,(df   Nf=f!,(df   NL=f!,(df   g=f)Nz
issue20884.pyr�latin1�
)r�newlinez#coding: iso-8859-1
z"""
�zQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rr)rr�r-r�r�r	rh�rangerrr,)r4rr5r
�_rTrUrVs        r�test_issue20884�CmdLineTest.test_issue20884�s����
�
�
!�Z��'�'�,�,�z�?�C�K��k�3��4�H�A����/�0����� ��r��A��G�G�M�*�#����� �I��%�%�:�6�/��<����7����S�#�&����S�#�&�"�
!�H�H��7�6��"�
!�s<�-D�AC:�D�6D�,D�:
D	�D�
D	�D�
D*c'�&# �[R"5n[R"US9 [RRUS5n[
U/UQ76 Uv� SSS5 SSS5 g!,(df   N=f!,(df   g=f7f)Nrr�)rr�rr-r�r�r)r4�argsrr�s    r�setup_test_pkg�CmdLineTest.setup_test_pkg�sc���
�
�
�
!�Z��$�$�*�5��g�g�l�l�:�z�:�G��W�$�t�$��M�6�"�
!�5�5��"�
!�s3�B�B�1A/�B�&	B�/
A=	�9B�
B�
Bc��[S/UQ7SS06up#n[S:�a[[U55 UR	US5 U$)Nr�rJFr)rr)r*r+r,)r4rrTrUrVs     r�check_dash_m_failure� CmdLineTest.check_dash_m_failure�sB��,�T�K�D�K�U�K�����Q�;��$�s�)������Q���
rc���UR5n[USS5nUR"S/[Q76nUR	SU5 SSS5 g!,(df   g=f)Nrz+if __name__ == '__main__': raise ValueErrorztest_pkg.others
ValueError)rrrrOr/)r4r�r5rVs    r�test_dash_m_error_code_is_one�)CmdLineTest.test_dash_m_error_code_is_one�sT���
 �
 �
"�g�+�G�W�,Y�[�K��+�+�,<�L�|�L�C��M�M�-��-�	#�
"�
"�s�7A�
Ac��SnUHcup#URU5 [SU5upEnURUS5 URXc5 UR	SU5 SSS5 Me g!,(df   Mw=f)N))�builtinssNo code object available)z
builtins.xs=Error while finding module specification.*ModuleNotFoundError)zbuiltins.x.ys]Error while finding module specification.*ModuleNotFoundError.*No module named.*not a package)rs=No module named.*is a package and cannot be directly executed)zimportlib.nonexistentsNo module named)z	.unittests#Relative module names not supportedr�r�	Traceback)�subTestrr,�assertRegex�assertNotIn)r4�tests�name�regexrTrrVs       r�test_dash_m_errors�CmdLineTest.test_dash_m_errors�sp��

��!�K�D����d�#�2�4��>�
��s�� � ��Q�'�� � ��,�� � ��s�3�	$�#�!�#�#�s�AA-�-
A<	c���[R"5n[R"US9 [R"S5 [SS5 SSS5 UR
S5nURUS5 URSU5 URSU5 SSS5 SSS5 g!,(df   Nf=f!,(df   N(=f!,(df   g=f)Nrr�ztest_pkg/__init__.pyc�wbsGError while finding module specification.*ImportError.*bad magic numbersis a packager&)	rr�rr-�mkdirr	rr(r)�r4rrVs   r�test_dash_m_bad_pyc�CmdLineTest.test_dash_m_bad_pyc�s���
�
�
�
!�Z��$�$�*�5��H�H�Z� ��-�t�4��5��+�+�J�7�C����S�2�
3�
���_�c�2����\�3�/�6�"�
!�5�4��6�5��"�
!�s;�C�#C�B0�AC�C�0
B>�:C�
C	�C�
C c�R�[R"5n[R"US9 [SS5 SSS5 UR	S5nURSU5 SSS5 SSS5 g!,(df   NB=f!,(df   N(=f!,(df   g=f)Nrz
asyncio.pyr0s>Try using 'asyncio' instead of 'asyncio.py' as the module name)rr�rr	rr/r2s   r�*test_hint_when_triying_to_import_a_py_file�6CmdLineTest.test_hint_when_triying_to_import_a_py_file�s~��
�
�
�
!�Z��$�$�*�5��l�D�)��*��+�+�L�9�C��M�M�@�AD�
F�6�"�
!�*�)��6�5��"�
!�s8�B�
B�A6�+B�%B�6
B�B�
B	�B�
B&c���[[[[4nUH�nURnSRU5nUR
U5 URU5nURS5nURURS5U5 URSU5 URSU5 SSS5 SSS5 M� g!,(df   N=f!,(df   M�=f)Nz%raise {0}('Exception in __init__.py')r��asciisException in __init__.pyr&)�ImportError�AttributeError�	TypeError�
ValueError�__name__�formatr'rrr/r0)r4�
exceptions�	exception�initr�rVs      r�test_dash_m_init_traceback�&CmdLineTest.test_dash_m_init_tracebacks���"�>�9�j�I�
�#�I�!�*�*�I�:�A�A�)�L�D����i�(��'�'��-���/�/�
�;���
�
�i�.�.�w�7��=��
�
�9�3�?��
�
�l�C�0�	.�)�(�$�.�-��)�(�s%�
C�AC�3C�
C�C�
C(	c��UR5nSn[USU5 URS5nURSU5 URSU5 URSU5 SSS5 g!,(df   g=f)Nz1raise ImportError('Exception in __main__ module')r�r�sImportErrorsException in __main__ moduler&)rrrr/)r4r��mainrVs    r�test_dash_m_main_traceback�&CmdLineTest.test_dash_m_main_tracebacksh��
�
 �
 �
"�g�F�D��g�z�4�8��+�+�J�7�C��M�M�.�#�.��M�M�9�3�?��M�M�,��,�
#�
"�
"�s�AA1�1
A?c��[R"S5n[R"5n[	USU5n[U5upEnUR
S5RS5nUR[U5S5 URUSRS55 URUSRS	55 URUS
RS55 SSS5 g!,(df   g=f)Nz|            try:
                raise ValueError
            except:
                raise NameError from None
            r�r9r�r�	Tracebackrz  File ��	NameError)�textwrap�dedentrr�rr�decode�splitr,�lenr��
startswith�r4r�rr5�exitcodersrn�texts        r�test_pep_409_verbiage�!CmdLineTest.test_pep_409_verbiages������"����
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f��=�=��)�/�/��5�D����S��Y��*��O�O�D��G�.�.�{�;�<��O�O�D��G�.�.�y�9�:��O�O�D��G�.�.�{�;�<�"�
!�
!�s�CC5�5
Dc�j�[R(aD[RS;a0[(d%[
R"[R5nO7[R(a[RnOURS5 Sn[[
R"5WU5nUR[RU5 [U5upEnUR[U5UR!5R#S5SU<SU<35 URSU5 g)N>�wasi�win32�
emscriptenzneed os_helper.TESTFN_NONASCIIzprint(ascii(__file__))
r9zstdout=z stderr=r)r�TESTFN_UNDECODABLEr1�platformrr-�fsdecode�TESTFN_NONASCII�skipTestrr.�
addCleanup�unlinkrr,r9�rstriprP)r4r+rr5rTrsrns       r�test_non_ascii�CmdLineTest.test_non_ascii0s���
�(�(����%���H��;�;�y�;�;�<�D�
�
&�
&��,�,�D��M�M�:�;�,��'��	�	��T�6�B�����	�(�(�+�6�-�k�:���F�����+���M�M�O�"�"�7�+�%+�V�4�	6�	
����B�rc�&�[R"S5n[R"5n[	USU5n[U5upEnUR
S5nURUR5S5 SSS5 g!,(df   g=f)Nz�            import sys
            error = None
            try:
                raise ValueError('some text')
            except ValueError as err:
                error = err

            if error:
                sys.exit(error)
            r�r9z	some text)	rNrOrr�rrrPr,rdrTs        r�)test_issue20500_exit_with_exception_value�5CmdLineTest.test_issue20500_exit_with_exception_valueMsr�����
"�
���
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f��=�=��)�D����T�[�[�]�K�8�	"�
!�
!�s�A
B�
Bc�2�Sn[R"5n[USU5n[U5upEn[R
"[R"U5S5R5nURSU5 SSS5 g!,(df   g=f)Nz
1 + 1 = 2
r�r9z
    ^^^^^
)	rr�rr�io�
TextIOWrapper�BytesIOrtr/rTs        r�*test_syntaxerror_unindented_caret_position�6CmdLineTest.test_syntaxerror_unindented_caret_position_sp����
�
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f��#�#�B�J�J�v�$6��@�E�E�G�D��M�M�/�4�0�"�
!�
!�s�A'B�
Bc�N�[R"S5n[R"5n[	USU5n[U5upEn[R"[R"U5S5R5nURSU5 Sn[	USU5n[U5upEn[R"[R"U5S5R5nURSU5 URSU5 SSS5 g!,(df   g=f)Nz;            if True:
                1 + 1 = 2
            r�r9z
    1 + 1 = 2
    ^^^^^
zif True:
    1 + 1 = 2
�)rNrOrr�rrrkrlrmrtr/r)rTs        r�(test_syntaxerror_indented_caret_position�4CmdLineTest.test_syntaxerror_indented_caret_positionhs������"����
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f��#�#�B�J�J�v�$6��@�E�E�G�D��M�M�8�$�?�$�
�,�J��&�I�K�'<�[�'I�$�H�f��#�#�B�J�J�v�$6��@�E�E�G�D����T�4�(��M�M�8�$�?�!"�
!�
!�s�C!D�
D$c���Sn[R"5n[USU5n[U5upEnUR	UR5SS/SQ5 SSS5 g!,(df   g=f)Nzfoo = f"""{}
foo"""
r����)s    foo = f"""{}s               ^s;SyntaxError: f-string: valid expression required before '}'�rr�rrr,�
splitlines�r4r�rr5rUrsrns       r�#test_syntaxerror_multi_line_fstring�/CmdLineTest.test_syntaxerror_multi_line_fstringsd��)��
�
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f�����!�!�#�B�C�(��
�"�
!�
!���AA"�"
A0c���Sn[R"5n[USU5n[SU5upEnUR	UR5SS/SQ5 SSS5 g!,(df   g=f)Nzfoo = """\q"""
r�z-Werrorru)s    foo = """\q"""s             ^^s)SyntaxError: invalid escape sequence '\q'rvrxs       r�3test_syntaxerror_invalid_escape_sequence_multi_line�?CmdLineTest.test_syntaxerror_invalid_escape_sequence_multi_line�sk��$��
�
�
�
!�Z�+�J��&�I�K�'<��;�(�$�H�f�
����!�!�#�B�C�(��
�"�
!�
!�s�AA#�#
A1c���Sn[R"5n[USU5n[U5upEnUR	UR5SSSS/5 SSS5 g!,(df   g=f)Nz?x = '' nothing to see here
';import os;os.system('echo pwnd')
r����s	    x = '�2SyntaxError: source code cannot contain null bytesrvrxs       r�test_syntaxerror_null_bytes�'CmdLineTest.test_syntaxerror_null_bytes�sj��U��
�
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f�����!�!�#�B�C�(� �I��
�"�
!�
!�r{c��SS/n[R"5nUHCn[USU5n[U5u pVUR	UR5SSSS/5 ME SSS5 g!,(df   g=f)Nz
'''
multilinestring
'''z
f'''
multilinestring
'''r�r�s    multilinestringr�rv)r4�scriptsrr�r5rrns       r�/test_syntaxerror_null_bytes_in_multiline_string�;CmdLineTest.test_syntaxerror_null_bytes_in_multiline_string�sy��2�4T�U��
�
�
�
!�Z�!��/�
�H�f�M��4�[�A���1�� � ��%�%�'���,�.�M���"�"�
!�
!�s�A
A-�-
A;c�j�[SS5u p/SQnURUR5U5 g)Nr`z1/0)s"Traceback (most recent call last):s&  File "<string>", line 1, in <module>s    1/0rs#ZeroDivisionError: division by zero)rr,rw)r4rrn�expected_liness    r�/test_source_lines_are_shown_when_running_source�;CmdLineTest.test_source_lines_are_shown_when_running_source�s4��,�T�5�9���1�4��	
����*�*�,�n�=rc�P�Sn[R"5n[USU5n[U5upEn[R
"[R"U5S5R5nURURS5U5 SSS5 g!,(df   g=f)Nznonlocal x
r�r9z>SyntaxError: nonlocal declaration not allowed at module level
)
rr�rrrkrlrmrtr��endswithrTs        r�test_syntaxerror_does_not_crash�+CmdLineTest.test_syntaxerror_does_not_crash�s����
�
�
�
!�Z�+�J��&�I�K�'<�[�'I�$�H�f��#�#�B�J�J�v�$6��@�E�E�G�D��O�O�D�M�M�Q���
�"�
!�
!�s�A6B�
B%c���[R"S5nSUl[R"5n[R"5n[USU5n[
SXBS9n[U5R5R5nURUSU5 URX&5 [
SX2S9n[U5R5R5nURXv5 [
SX2S9n[U5R5R5nURX�U5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)N�c            import sys
            for entry in sys.path:
                print(entry)
            r�z-EsrFrz-I)rNrO�maxDiffrr�rr
rrPrwr,r))	r4r��work_dirrr5rj�out_by_name�
out_by_dir�out_by_dir_isolateds	         r�-test_consistent_sys_path_for_direct_execution�9CmdLineTest.test_consistent_sys_path_for_direct_execution�s�����"������
�
�
�
!�X�y�/A�/A�/C�z�+�J�
�F�K�K��U�K�>�A�%�a�.�/�/�1�<�<�>�K����[��^�Z�8����X�3��U�J�=�A�$�Q��.�.�0�;�;�=�J����Z�5��T�:�<�A�"-�a�.�"7�"7�"9�"D�"D�"F�����0�k�J�0D�
!�
!�/C�/C��
!�
!�s$�E�	C*E�3E�
E	�E�
E#c���[R"S5nSUl[R"5n[
RRUS5n[
R"U5 [USU5n[SSUS9n[U5R5R5nURUSU5 URX65 [SSUS9n[U5R5R5nURXv5 [!SSUS9up�n
U
R5R5nUR#S	US
5 SSS5 g!,(df   g=f)Nr��
script_pkgr�z-smzscript_pkg.__main__rFrz-ImzNo module named script_pkg���)rNrOr�rr�r-r�r�r1rr
rrPrwr,r)rr/)r4r�r�rr5rj�
out_by_module�out_by_packagerUrsrn�traceback_liness            r�-test_consistent_sys_path_for_module_execution�9CmdLineTest.test_consistent_sys_path_for_module_execution�s.�����"������
�
�
�
!�X������h��=�J��H�H�Z� �+�J�
�F�K�K��U�$9�x�H�A�'��N�1�1�3�>�>�@�M����]�1�-�x�8����Z�7��U�L�h�?�A�(��^�2�2�4�?�?�A�N����^�;�'<��|��(�$�H�f�%�m�m�o�8�8�:�O��M�M�6���8K�L�)"�
!�
!�s�D E�
E*c�4�SnUR[RRU55 [	US[
R[
RS9nUR5up4URSU5 URURS5 g)Nznonexistingscript.pyT)rVrsrnz: can't open file r)�assertFalser-r��existsr
rprq�communicater/�assertNotEqual�
returncode)r4r��procrUrVs     r�test_nonexisting_script�#CmdLineTest.test_nonexisting_scriptsu��
(�����������/�0��F��#-�?�?�#-�?�?�4���#�#�%����
�
�*�C�0����D�O�O�Q�/rz	/dev/fd/0zrequires /dev/fd platform�freebsdz/devz/dev/fdz.Requires fdescfs mounted on /dev/fd on FreeBSDc�p�Sn[R"5n[USU5n[US5n[	SUR53SSSSUR54S	9nUR
5upgURUS
5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nz print("12345678912345678912345")z	script.py�rz/dev/fd/Trrr�)�	close_fds�pass_fdss12345678912345678912345
)rr�rr	r
�filenor�r,)r4r�r�r5�fprjrUrVs        r�test_script_as_dev_fd�!CmdLineTest.test_script_as_dev_fds���4��
�
�
�
!�X�+�H�k�6�J�K��k�3�'�2� �8�B�I�I�K�=�!9�T�UV�WX�YZ�[]�[d�[d�[f�Tg�h���=�=�?���� � ��&B�C�(�"�
!�'�'��"�
!�s#�B'�AB�B'�
B$	� B'�'
B5)r�r)F)Kr>�
__module__�__qualname__�__firstlineno__rDrWr]rdrk�
contextlib�contextmanagerrxr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr"r-r3r6rCrGrWrerhrnrrryr}r�r�r�r�r�r�r��unittest�
skipUnlessr-r�r��skipIfr1r^rS�stat�st_devr��__static_attributes__�rrr%r%\s���
<@�9�D59�
C� 59�9� %�
%�������&B�	C�'�+�'�+�8�
E�I�E�I�6�
6�6�6�6�4�/�D�D�/�/�N�	N�I�"
A�L�'�"�������.�4�(0�F�1�-�=�$ �:9�$1�@�.�
�
��>�	�K�>#M�J
0����������4�6Q�R�
�_�_�S�\�\�,�,�Y�7�I��W�W�V�_�+�+�r�w�w�y�/A�/H�/H�H�E�G�
D�G�S�
Drr%c�.�[R"5 gr)r�
reap_childrenr�rr�tearDownModuler�/s�����rr�)&r�r�importlib.machineryr�r�r1r-�os.pathr�rprkrN�testr�test.supportrrr�test.support.script_helperrrr	r
rrr
rr)rO�test_sourcerr#�force_not_colorized_test_class�TestCaser%r�r>rFr�rr�<module>r�s��������
�	����	���;�;�H�H�H��/�/��*��3��j;F��*���	�'�'�ND�(�#�#�ND�(�ND�d��z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit