403Webshell
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/test_sqlite3/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_sqlite3/__pycache__/test_cli.cpython-315.opt-1.pyc
R
>lqjFc�t�Qs]PHs]PHs]PHs]PHs]PHs]PHs]QHGs	]QH(Gs]QH0G
s
Gs]QH<Gs]QHDGsGsGsGsGsGs\QQ\O022s\QQ	\O022s\2\Q
Q\O0222s\Q6Xc\O2P!P!)
zsqlite3 CLI tests.)�main)�
import_module)�TESTFN�unlink)�run_pty)�captured_stdout�captured_stderr�captured_stdin�force_not_colorized_test_class�requires_subprocess�verbosec�``�\sQs]snQP	-QksQsQsQsQsQs	Qs
Q	sQ
sQs
UsP!)�CommandLineInterface�expect_successc��[29^tt^2o[29^tt^2oUO[29^tt^2o[	U2PPP2PPP2PPP2WO2WO2WOO1!)%fhKU9h)%fhK`9h)%fhKk9h�N)rr�assertRaises�
SystemExit�cli�getvalue�	exception�code)�selfr�args�out�err�cms&$*   �/C:\Python315\\Lib\test\test_sqlite3\test_cli.py�_do_test�CommandLineInterface._do_tests��������������j�)�)�R���I�
*�
�
�
�|�|�~�s�|�|�~�r�|�|�/@�/@�@�@�
*�)��
���
��sL�C�B1	�B
�B1	�C�B.�'B.�)B1	�1C
�:C
�<C�C	�
C	c	��UOUvq#oUOU]QOQU80V#,22UOUP2U!)��
�Unexpected failure: args=)r�assertEqual�join�rrrrrs&*   rr�#CommandLineInterface.expect_success#sU������-���$�����q����&@�4�'�$B�C�#M�N�	P�����b�!��
�c	��UOUQP
-vq#oUOU]QOQU80V#,22UOUP2U!)rr!r")r�assertNotEqualr$r#r%s&*   r�expect_failure�#CommandLineInterface.expect_failure*sZ������C�U�C���$����D�!� �I�I�)C�d�W�'E�s�&P�Q�	S�����b�!��
r'c��UOQ2oUOQU2UOQU2UOQU2P!)z-hzusage: z [-h] [-v] [filename] [sql]zPython sqlite3 CLI�r�assertIn�rrs& r�
test_cli_help�"CommandLineInterface.test_cli_help1s>���!�!�$�'���
�
�i��%��
�
�3�S�9��
�
�*�C�0r'c�j�UOQ2oUO[OU2P!)z-v)rr.�sqlite3�sqlite_versionr/s& r�test_cli_version�%CommandLineInterface.test_cli_version7s&���!�!�$�'���
�
�g�,�,�c�2r'c�P�UOQQ2oUOQU2P!)�:memory:zselect 1z(1,)r-r/s& r�test_cli_execute_sql�)CommandLineInterface.test_cli_execute_sql;s"���!�!�*�j�9���
�
�f�c�"r'c�R�UOQQ2oQoUOV!2P!)r8zselect 1; select 2z>ProgrammingError: You can only execute one statement at a time�r*r.)r�stderrrs&  r�test_cli_execute_too_much_sql�2CommandLineInterface.test_cli_execute_too_much_sql?s&���$�$�Z�1E�F��N���
�
�c�"r'c�P�UOQQ2oUOQU2P!)r8�sel�OperationalError (SQLITE_ERROR)r<)rr=s& r�test_cli_execute_incomplete_sql�4CommandLineInterface.test_cli_execute_incomplete_sqlDs#���$�$�Z��7���
�
�7��@r'c���UO[[2UO[Q2oUO	UP2UO[Q2oUOQU2P!)zcreate table t(t)zselect count(t) from tz(0,))�
addCleanuprrrr#r.r/s& r�test_cli_on_disk_db�(CommandLineInterface.test_cli_on_disk_dbHsT�������'��!�!�&�*=�>������b�!��!�!�&�*B�C���
�
�f�c�"r'�)�__name__�
__module__�__qualname__�__firstlineno__rrr*r0r5r9r>rCrG�__static_attributes__�__classdictcell__��
__classdict__s@rr
r
sA����A�T�A���1�3�#�#�
A�#�#r'r
c�`�\sQs]PsnQsQsQsQQ-QksQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsUsP!)�InteractiveSessionz+Connected to a transient in-memory databasezsqlite> z    ... �commandsc��[29^tt^2o[29^tt^2o[29^tt^2oUO[29^tt^2oSFDoUOUQ*2J	UO
]2[U2PPP2PPP2PPP2PPP2WO2oWO2o	UOWOO]QU8QUQU	02V�1!)%fhK|9h)%fhK�9h)%fhK�9h)%fhK�9h)r!r")rrrrr�write�seekrrr#rr)
rrTr�stdin�stdoutr=r�cmdrrs
&$*       r�run_cli�InteractiveSession.run_cliVs������������������j�)�)�R������C�$�J�'� ��J�J�q�M���I�
*�
�
�
��o�o����o�o���������*�*�A�5��w�b���R��u�E�	G��x��
*�)��
���
���
��si�E�D1	�D
�?D�D
�D1	�'E�D�D�D
�D.�'D.�)D1	�1E
�:E
�<E�E	�
E	c�~�UO2vqUOUOU2UOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)��r[r.�
MEMORY_DB_MSG�assertEndsWith�PS1r#�count�PS2�rrrs&  r�
test_interact� InteractiveSession.test_interacths����<�<�>����
�
�d�(�(�#�.��
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c�J�UOQQ5vqUOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�.quit�rT)rir_res&  r�test_interact_quit�%InteractiveSession.test_interact_quitpst���<�<��<�4����
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c���UOQQ5vqUOUOU2UO[OQ*U2UOVO2UOUOUO2]2UOUOUO2]2UO[OU2P!)�.versionrjr!)rn)
r[r.r`r3r4rarbr#rcrdres&  r�test_interact_version�(InteractiveSession.test_interact_versionws����<�<��<�7����
�
�d�(�(�#�.��
�
�g�,�,�t�3�S�9����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0��
�
�g�,�,�c�2r'c�J�UOQQ5vqUOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�rj)rr� r_res&  r�test_interact_empty_source�-InteractiveSession.test_interact_empty_source�st���<�<��<�3����
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c��UOQQ5vqUOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2UOQU2UOQU2P!)�.unknown_commandrjzError: unknown command: "�unknown_command)rwr_res&  r�"test_interact_dot_commands_unknown�5InteractiveSession.test_interact_dot_commands_unknown�s����<�<�)?�<�@����
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0��
�
�1�3�7��
�
�'��-r'c�J�UOQQ5vqUOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�.rjr_res&  r� test_interact_dot_commands_empty�3InteractiveSession.test_interact_dot_commands_empty�st���<�<�#�<�/����
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c��UOQQ5vqUOUOU2UOUO	[
OQ*2]2UOVO2UOUO	UO2]2UOUO	UO2]2P!)�	.version rjr!)r�z	. version)
r[r.r`r#rcr3r4rarbrdres&  r�+test_interact_dot_commands_with_whitespaces�>InteractiveSession.test_interact_dot_commands_with_whitespaces�s����<�<�)C�<�D����
�
�d�(�(�#�.�������7�#9�#9�D�#@�A�1�E����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c�n�UOQQ5vqUOUOU2UOQU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�	SELECT 1;rj�(1,)
)r�r_res&  r�test_interact_valid_sql�*InteractiveSession.test_interact_valid_sql�s����<�<��<�8����
�
�d�(�(�#�.��
�
�h��$����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c�J�UOQQ5vqUOUOU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�SELECT 1rj)r�)r[r.r`rardr#rcrbres&  r�&test_interact_incomplete_multiline_sql�9InteractiveSession.test_interact_incomplete_multiline_sql�st���<�<��<�7����
�
�d�(�(�#�.����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c��UOQQ5vqUOUOU2UOUOU2UOQU2UO	VO
2UO
UOUO
2]2UO
UOUO2]2P!)�
SELECT 1
;rjr�)r�)r[r.r`rdrarbr#rcres&  r�!test_interact_valid_multiline_sql�4InteractiveSession.test_interact_valid_multiline_sql�s����<�<�)9�<�:����
�
�d�(�(�#�.��
�
�d�h�h��$��
�
�h��$����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c�n�UOQQ5vqUOUOU2UOQU2UOVO2UOUO
UO2]2UOUO
UO2]2P!)�sel;rjrB�r�r_res&  r�test_interact_invalid_sql�,InteractiveSession.test_interact_invalid_sql�s����<�<��<�3����
�
�d�(�(�#�.��
�
�7��=����C���*�������4�8�8�,�a�0�������4�8�8�,�a�0r'c�&�UO[[2UO[QQ5vqUO	[U2UOVO2UO[QQ5vqUO	QU2P!)�CREATE TABLE t(t);rjz(0,)
)r�)zSELECT count(t) FROM t;)rFrrr[r.rarb)rrr�_s&   r�test_interact_on_disk_file�-InteractiveSession.test_interact_on_disk_file�sh�������'��<�<��1H�<�I����
�
�f�c�"����C���*����f�/K��L����
�
�h��$r'c�P�[OOQP	Q59^tt^2UOQQ5vqUO	QU2UO	QU2UOQQ5vqUO	QU2PPP2P!)%fhP!9h)z_colorize.can_colorize)�return_valuezTEXT
rjzsqlite> z    ... zMOperationalError (SQLITE_ERROR): near "sel": syntax errorr�)�unittest�mock�patchr[r.res&  r�
test_color�InteractiveSession.test_color�s���
�]�]�
 �
 �!9��
 �
M�
M��|�|�X�|�6�H�C��M�M�E�s�K��M�M�M�s�S��|�|�Y�|�7�H�C��M�M�D�EH�
J�N�
M�
M�
M�s�AB�B%	�B%	rI)rJrKrLrMr`rbrdr[rfrkrortryr}r�r�r�r�r�r�r�rNrOrPs@rrSrSPsh����A�M�
$�C�
$�C��b��$1�1�3�1�.�1�1�1�1�1�1�%�J�Jr'rSc�T`�\sQs]�snQs\Q2sQQksQsQs	\
O\OQ6Q2Q2s\
O\OQ6Q2Q	2sQ
s\
O\O$O'Q2Q2Q2sQ
sQsUsP!)�
Completionzsqlite> c���[Q2oUOQ6Xc[OQ2g[O
O
Q2%c[OQ2gP!)�readline�editlinez!libedit readline is not supported�openbsdz$OpenBSD readline hangs on completion)r�backendr��SkipTest�sys�platform�
startswith)�clsr�s& r�
setUpClass�Completion.setUpClass�sX�� ��,�����z�)��#�#�$G�H�H��<�<�"�"�9�-�-��#�#�$J�K�K�.r'c�H�[OQ2o[V1U2!)aR
            import readline
            from sqlite3.__main__ import main

            # Configure readline to ...:
            # - hide control sequences surrounding each candidate
            # - hide "Display all xxx possibilities? (y or n)"
            # - show candidates one per line
            readline.parse_and_bind("set colored-completion-prefix off")
            readline.parse_and_bind("set completion-query-items 0")
            readline.parse_and_bind("set page-completions off")
            readline.parse_and_bind("set completion-display-width 0")

            main()
        )�textwrap�dedentr)r�input_�env�scripts&&& r�write_input�Completion.write_input�s$�����"�
���v�s�+�+r'c���[Q2o[UQ2%f[OQ2gQoUO	U2oUOQU2UOQU2UOQU2UOQU2QoUO	U2oUOQU2UOQU2Q	oUO	U2oUOQ
U2P!)�_sqlite3�SQLITE_KEYWORDSz#unable to determine SQLite keywordssS		EL	 1;
.quit
sSELECTsSETs	SAVEPOINTs(1,)ssel		 1;
.quit
s.ver	
.quit
s.version)r�hasattrr�r�r�r.)rr�r��outputs&   r�test_complete_sql_keywords�%Completion.test_complete_sql_keywords�s��� ��,���x�!2�3�3��#�#�$I�J�J�*���!�!�&�)���
�
�i��(��
�
�f�f�%��
�
�l�F�+��
�
�g�v�&�(���!�!�&�)���
�
�i��(��
�
�g�v�&�$���!�!�&�)���
�
�k�6�*r'c��[OQ2O2oUOU2oUO	2O2o[
U2TTt,tFD*vqEUOUO2%fJ(UMJ,	oooUQ*UQ*q�V7]*UT	t,tFDp�O2MJ	o
o	UOU
,QN2UQ*UP*q�V7]*UT	t,tFDp�O2MJ	o
o	UO[U
2]2P!ttoohtto	htto	h)a�            CREATE TABLE _Table (id);
            CREATE INDEX _Index ON _table (id);
            CREATE TRIGGER _Trigger BEFORE INSERT
                   ON _Table BEGIN SELECT 1; END;
            CREATE VIEW _View AS SELECT 1;

            CREATE TEMP TABLE _Temp_table (id);
            CREATE INDEX temp._Temp_index ON _Temp_table (id);
            CREATE TEMP TRIGGER _Temp_trigger BEFORE INSERT
                   ON _Table BEGIN SELECT 1; END;
            CREATE TEMP VIEW _Temp_view AS SELECT 1;

            ATTACH ':memory:' AS attached;
            CREATE TABLE attached._Attached_table (id);
            CREATE INDEX attached._Attached_index ON _Attached_table (id);
            CREATE TRIGGER attached._Attached_trigger BEFORE INSERT
                   ON _Attached_table BEGIN SELECT 1; END;
            CREATE VIEW attached._Attached_view AS SELECT 1;

            SELECT id FROM _		ta	;
            .quit
������)�_Attached_index�_Attached_table�_Attached_trigger�_Attached_view�_Index�_Table�_Temp_index�_Temp_table�
_Temp_trigger�
_Temp_view�_Trigger�_View)r�r��encoder��decode�
splitlines�	enumerater�rb�stripr#�len�rr�r��lines�i�line�indices�start�end�l�
candidatess&          r�*test_complete_table_indexes_triggers_views�5Completion.test_complete_table_indexes_triggers_viewss�����"��*���+	�,�!�!�&�)���
�
��*�*�,��$-�e�$4�0�$4����_�_�T�X�X�.��1�$4��0��R�[�'�"�+�s�).�Q�w�s�);�<�);�A�g�g�i�);�
�<�����

�	
� �R�[�'�"�+�s�).�Q�w�s�);�<�);�A�g�g�i�);�
�<�����Z��!�,��/0��=��&=s�"'D:�D:�4E�EzAPRAGMA table-valued function is not available until SQLite 3.16.0c���[OQ2O2oUOU2oUO	2O2o[
U2TTt,tFD*vqEUOUO2%fJ(UMJ,	oooUQ*UQ*q�V7]*UT	t,tFDp�O2MJ	o
o	UOU
,QN2P!ttoohtto	h)a            CREATE TABLE _table (_col_table);
            CREATE TEMP TABLE _temp_table (_col_temp);
            ATTACH ':memory:' AS attached;
            CREATE TABLE attached._attached_table (_col_attached);

            SELECT _col_		ta	FROM _table;
            .quit
r�r�)�
_col_attached�
_col_table�	_col_temp)r�r�r�r�r�r�r�r�rbr�r#r�s&          r�test_complete_columns� Completion.test_complete_columnsBs������"�����	��!�!�&�)���
�
��*�*�,��&�u�-�
�-�'�!�������1J�A�A�-�	�
��R�[�'�"�+�s�).�Q�w�s�);�<�);�A�g�g�i�);�
�<�����D�	
��

��=s�"'C&�C&�4C,z9PRAGMA function_list is not available until SQLite 3.30.0c���QoUOU2oUOQU2UOQU2QoUOU2oUOQU2UOQU2P!)sSELECT AV	1);
.quit
sAVG(1);s(1.0,)sSELECT av	1);
.quit
)r�r.)rr�r�s&  r�test_complete_functions�"Completion.test_complete_functionsZsh��,���!�!�&�)���
�
�j�&�)��
�
�i��(�,���!�!�&�)���
�
�j�&�)��
�
�i��(r'c�J�[OQ2O2oUOU2oUO	2O2o[
U2TTt,tFD*vqEUOUO2%fJ(UMJ,	oooUQ*UQ*q�V7]*UT	t,tFDp�O2MJ	o
o	UOQU
2UOQU
2UOQU
2UOQU
2P!ttoohtto	h)aw            ATTACH ':memory:' AS MixedCase;
            -- Test '_' is escaped in Like pattern filtering
            ATTACH ':memory:' AS _underscore;
            -- Let database_list pragma have a 'temp' schema entry
            CREATE TEMP TABLE _table (id);

            SELECT * FROM 		mIX	.sqlite_master;
            SELECT * FROM _und	.sqlite_master;
            .quit
�	MixedCase�_underscorer�temp���r�)r�r�r�r�r�r�r�r�rbr�r.r�s&          r�test_complete_schemata�!Completion.test_complete_schematais������	"�	����	��!�!�&�)���
�
��*�*�,��&�u�-�
�-�'�!�������1J�A�A�-�	�
��R�[�'�"�+�s�).�Q�w�s�);�<�);�A�g�g�i�);�
�<��
�
�k�:�.��
�
�m�Z�0��
�
�f�j�)��
�
�f�j�)��
��=s�"'D�D�4D zTwo actual tabs are inserted when there are no matching completions in the pseudo-terminal opened by run_pty() on this platformc�4`�QoROU-[OAQQ-AQ5oUO2O	2oU1Qk[U]22o[
UP2oROUP2ROU[U22P!)sxyzzy		.quit
�NO_COLOR�1�r�c3�:�SF �D0vqUOROQ02%fJ+Uw�	J2	P!3h)�xyzzy)r�rb)�.0r�r�rs&  �r�	<genexpr>�4Completion.test_complete_no_match.<locals>.<genexpr>�s1��0���0�'�!����$�(�(��5�1�2�
�A�0�s
�(A�A)
r��os�environr�r�r��nextr)r#r�)rr�r�r�r��line_numsf     r�test_complete_no_match�!Completion.test_complete_no_match�s����
3���!�!�&�.M����.M�Z��.M�!�N���
�
��*�*�,��
�&�u�a�0�
�����$�����H�b�)�	
����3�u�:�.r'c���[OQ2oQo[V-[OAQQ-AQ5oUO2O
2o[U2TTt,tFD*vqVUOUO2%fJ(UMJ,	oooUO[U2]2Uvq�VH]*U	T
t,tFDp�O2MJ	oo
UOU[U22P!ttoohtto
h[%cR[QO!]Q22[SOQQ52[Q	O!]Q22g9h)
a:
            import readline
            from sqlite3.__main__ import main

            # Configure readline to ...:
            # - hide control sequences surrounding each candidate
            # - hide "Display all xxx possibilities? (y or n)"
            # - hide "--More--"
            # - show candidates one per line
            readline.parse_and_bind("set colored-completion-prefix off")
            readline.parse_and_bind("set colored-stats off")
            readline.parse_and_bind("set completion-query-items 0")
            readline.parse_and_bind("set page-completions off")
            readline.parse_and_bind("set completion-display-width 0")
            readline.parse_and_bind("set show-all-if-ambiguous off")
            readline.parse_and_bind("set show-all-if-unmodified off")

            main()
        s		.quit
r�r�r�z
 PTY output: �-�replace)�errorsz end PTY output )r�r�rr�r�r�r�r�r�rbr#r�r��sortedr�print�center)rr�r�r�r�r�r�r�r�r�r�r�s&           r�test_complete_no_input�!Completion.test_complete_no_input�s8�����"�
��& ����-L��
�
�-L�J��-L�M��	��M�M�O�.�.�0�E�!*�5�!1��!1�g�a��?�?�4�8�8�,���!1�
��
���S��\�1�-� �J�E�-2��7�3�-?�@�-?��'�'�)�-?�J�@����Z��
�);�<����A��	��w��o�,�,�R��5�6��f�m�m�9�m�5�6��(�/�/��C�8�9��s6�+D�''D�D�.D�D�!D�D�
E+�AE+rIr)��r )r�r )�freebsd�	dragonfly�sunos)rJrKrLrMrb�classmethodr�r�r�r�r��skipIfr3�sqlite_version_infor�r�r�r�r�r�r�rrNrOrPs@rr�r��s������C��L��L�,�$+�00-�d�_�_�W�0�0�:�=�%�&�
�&�
�*�_�_�W�0�0�:�=�%�&�
)�&�
)�*�.�_�_�S�\�\�,�,�-N�O�(�)�
/�	)�
/�%�%r'r��__main__)�__doc__r3r�r�r��
unittest.mockr��sqlite3.__main__rr�test.support.import_helperr�test.support.os_helperrr�test.support.pty_helperr�test.supportrrrr	r
r�TestCaser
rSr�rJrIr'r�<module>rs�����
����	�(�4�1�+��� �5#�8�,�,�5#� �5#�p �@J��*�*�@J� �@J�F���b��"�"�b� ��b�L�z���M�M�O�r'

Youez - 2016 - github.com/yon3zu
LinuXploit