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

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


��Qc@�s�ddlmZddlZddlZeadejfd��YZdej	fd��YZ
d�Zd�Ze
d	kr�e�ndS(
i�(twith_statementNtMyConnectioncB�seZd�ZRS(cC�statjj|�dS(N(tTruetdid_rollbacktsqlitet
Connectiontrollback(tself((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyRs(t__name__t
__module__R(((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyRstContextTestscB�s5eZd�Zd�Zd�Zd�Zd�ZRS(cC�s2tjddt�|_|jjd�tadS(Ns:memory:tfactoryscreate table test(c unique)(RtconnectRtcontexecutetFalseR(R((s,/sys/lib/python2.7/sqlite3/test/py25tests.pytsetUp%scC�s|jj�dS(N(R
tclose(R((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyttearDown+scC�s|j�WdQXdS(s7Can the connection be used as a context manager at all?N(R
(R((s,/sys/lib/python2.7/sqlite3/test/py25tests.pytCheckContextManager.s
cC�s]|j�|jjd�WdQX|jj�|jjd�j�d}|j|d�dS(s*Is a commit called in the context manager?s"insert into test(c) values ('foo')Nsselect count(*) from testii(R
RRtfetchonetassertEqual(Rtcount((s,/sys/lib/python2.7/sqlite3/test/py25tests.pytCheckContextManagerCommit3s


cC�so|jtt�y4|j�|jjd�|jjd�WdQXWntjk
rZnX|jtt�dS(s,Is a rollback called in the context manager?sinsert into test(c) values (4)N(RRRR
RRtIntegrityErrorR(R((s,/sys/lib/python2.7/sqlite3/test/py25tests.pytCheckContextManagerRollback;s
(RR	RRRRR(((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyR
$s
				cC�s"tjtd�}tj|f�S(NtCheck(tunittestt	makeSuiteR
t	TestSuite(t	ctx_suite((s,/sys/lib/python2.7/sqlite3/test/py25tests.pytsuiteGscC�s tj�}|jt��dS(N(RtTextTestRunnertrunR(trunner((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyttestKst__main__(t
__future__RRtsqlite3RRRRRtTestCaseR
RR#R(((s,/sys/lib/python2.7/sqlite3/test/py25tests.pyt<module>s#		

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.