File: //opt/alt/python312/lib64/python3.12/test/test_sqlite3/__pycache__/test_dump.cpython-312.pyc
�
h�e� � �x � d dl Z d dlZddlmZ G d� de j
� Zedk( r e j � yy)� N� )�memory_databasec �6 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z y) � DumpTestsc �v � t j d� | _ | j j � | _ y )Nz:memory:)�sqlite�connect�cx�cursor�cu��selfs �B/opt/alt/python312/lib64/python3.12/test/test_sqlite3/test_dump.py�setUpzDumpTests.setUp s$ � ��.�.��,����'�'�.�.�"��� c �8 � | j j � y �N)r
�closer
s r �tearDownzDumpTests.tearDown
s � ����
�
�r c �R � g d�}|D �cg c] }| j j |� �� c} | j j � }|D �cg c] }|�� }}dg|z dgz }t t |� � D �cg c] }| j
|| || � �� c} y c c}w c c}w c c}w )N)
z#CREATE TABLE "index"("index" blob);z"INSERT INTO "index" VALUES(X'01');z3CREATE TABLE "quoted""table"("quoted""field" text);z4INSERT INTO "quoted""table" VALUES('quoted''value');z�CREATE TABLE t1(id integer primary key, s1 text, t1_i1 integer not null, i2 integer, unique (s1), constraint t1_idx1 unique (i2));z'INSERT INTO "t1" VALUES(1,'foo',10,20);z(INSERT INTO "t1" VALUES(2,'foo2',30,30);ztCREATE TABLE t2(id integer, t2_i1 integer, t2_i2 integer, primary key (id),foreign key(t2_i1) references t1(t1_i1));zrCREATE TRIGGER trigger_1 update of t1_i1 on t1 begin update t2 set t2_i1 = new.t1_i1 where t2_i1 = old.t1_i1; end;z;CREATE VIEW v1 as select * from t1 left join t2 using (id);�BEGIN TRANSACTION;�COMMIT;)r �executer
�iterdump�range�len�assertEqual)r �
expected_sqls�s�i�actual_sqlss r �test_table_dumpzDumpTests.test_table_dump s� � ��
�: &3�3�������� �3��G�G�����"#�n�Q�q�n��n�-�.��>�
�K��
� �3�}�-�.� 0��
� � �-��*�K��N� ;� 0�� 4��$�� 0s �"B� B�7B$c �V � g d�}| j j dj |� � |d j dd� |d<