Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/sqlite3/test/dump.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@s]ddlZddlZdejfd��YZd�Zd�ZedkrYe�ndS(i�Nt	DumpTestscBs,eZd�Zd�Zd�Zd�ZRS(cCs(tjd�|_|jj�|_dS(Ns:memory:(tsqlitetconnecttcxtcursortcu(tself((s'/sys/lib/python2.7/sqlite3/test/dump.pytsetUpscCs|jj�dS(N(Rtclose(R((s'/sys/lib/python2.7/sqlite3/test/dump.pyttearDownscCs�ddddddddd	d
dg}g|D]}|jj|�^q.|jj�}g|D]}|^q`}dg|d
g}gtt|��D] }|j||||�^q�dS(Ns#CREATE TABLE "index"("index" blob);s"INSERT INTO "index" VALUES(X'01');s3CREATE TABLE "quoted""table"("quoted""field" text);s4INSERT INTO "quoted""table" VALUES('quoted''value');s�CREATE TABLE t1(id integer primary key, s1 text, t1_i1 integer not null, i2 integer, unique (s1), constraint t1_idx1 unique (i2));s'INSERT INTO "t1" VALUES(1,'foo',10,20);s(INSERT INTO "t1" VALUES(2,'foo2',30,30);u)INSERT INTO "t1" VALUES(3,'fö',40,10);stCREATE TABLE t2(id integer, t2_i1 integer, t2_i2 integer, primary key (id),foreign key(t2_i1) references t1(t1_i1));srCREATE 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;s;CREATE VIEW v1 as select * from t1 left join t2 using (id);sBEGIN TRANSACTION;sCOMMIT;(RtexecuteRtiterdumptxrangetlentassertEqual(Rt
expected_sqlststitactual_sqls((s'/sys/lib/python2.7/sqlite3/test/dump.pytCheckTableDumps$	#

cCs�ddd��Y}||j_d}d}d||dg}|jj|�|jj|�t|jj��}|j||�dS(NtUnorderableRowcBseZd�Zd�ZRS(cSs
||_dS(N(trow(RRR((s'/sys/lib/python2.7/sqlite3/test/dump.pyt__init__9scSs|j|S(N(R(Rtindex((s'/sys/lib/python2.7/sqlite3/test/dump.pyt__getitem__;s(t__name__t
__module__RR(((s'/sys/lib/python2.7/sqlite3/test/dump.pyR8s	sCREATE TABLE "alpha" ("one");sCREATE TABLE "beta" ("two");sBEGIN TRANSACTION;sCOMMIT;((Rtrow_factoryRR
tlistRR(RRtCREATE_ALPHAtCREATE_BETAtexpectedtgot((s'/sys/lib/python2.7/sqlite3/test/dump.pytCheckUnorderableRow6s	(RRRR	RR!(((s'/sys/lib/python2.7/sqlite3/test/dump.pyRs			(cCstjtjtd��S(NtCheck(tunittestt	TestSuitet	makeSuiteR(((s'/sys/lib/python2.7/sqlite3/test/dump.pytsuiteKscCs tj�}|jt��dS(N(R#tTextTestRunnertrunR&(trunner((s'/sys/lib/python2.7/sqlite3/test/dump.pyttestNst__main__(R#tsqlite3RtTestCaseRR&R*R(((s'/sys/lib/python2.7/sqlite3/test/dump.pyt<module>sE		

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.