File: D:/Python311/Lib/test/test_sqlite3/__pycache__/test_dump.cpython-311.pyc
�
��Vc3 � �v � d dl Z d dlZddlmZ G d� de j � � Zedk r e j � � dS dS )� N� )�memory_databasec �2 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� ZdS )� DumpTestsc �t � t j d� � | _ | j � � � | _ d S )Nz:memory:)�sqlite�connect�cx�cursor�cu��selfs �/D:\Python311\Lib\test\test_sqlite3\test_dump.py�setUpzDumpTests.setUp s* � ��.��,�,����'�.�.�"�"����� c �8 � | j � � � d S �N)r
�closer
s r �tearDownzDumpTests.tearDown
s � ���
�
�����r c �� � ��� g d��� fd��D � � � j � � � }d� |D � � �dg�z dgz ���� fd�t t �� � � � D � � d S )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);c �D �� g | ]}�j � |� � ��S � )r �execute)�.0�sr s �r �
<listcomp>z-DumpTests.test_table_dump.<locals>.<listcomp>. s'