Your IP : 216.73.216.196


Current Path : /opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyc

�
R�Xc@sVddlmZmZmZddlmZddlmZdefd��YZ	dS(i����(t
ComparisontShouldRaisetshould_raise(tTestCasei(t
py_33_plustTestShouldRaisecBs:eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#RS("cCs&d�}ttd��|��dS(NcSstd��dS(Nswrong value supplied(t
ValueError(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pytto_test
sswrong value supplied(RR(tselfR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_no_paramss	cCsfd�}ytt��|��Wn/tk
rT}|j|ttd���nX|jd�dS(NcSsdS(N((((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRss"None raised, ValueError() expectedsNo exception raised!(RRtAssertionErrortassertEqualtCtfail(RRte((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_no_exceptions	cCsid�}yttd��|��Wn/tk
rW}|j|ttd���nX|jd�dS(NcSstd��dS(Ntbar(R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRstfoos6ValueError('bar',) raised, ValueError('foo',) expectedsNo exception raised!(RRR
RRR
(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_wrong_exceptions	cCs d�}tt�|��dS(NcSstd��dS(NR(R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR-s(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_only_exception_class,s	cCs`d�}yt�|��Wn/tk
rN}|j|ttd���nX|jd�dS(NcSsdS(N((((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR5ssNo exception raised!(RR
RRR
(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_no_supplied_or_raised1s	cCs)d�}ttd��|�d�dS(NcWstdt|���dS(Ns%s(Rtrepr(targs((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRBss(1,)i(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt	test_argsAs	cCs,d�}ttd��|�dd�dS(NcSstd|��dS(Ns%s(R(tx((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRGst1Ri(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_kw_to_argsFs	cCs,d�}ttd��|�dd�dS(Nc[std|��dS(Ns%r(R(tkw((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRLss{'x': 1}Ri(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_kwKs	cCs/d�}ttd��|�ddd�dS(Nc_std||f��dS(Ns%r %r(R(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRQss
(1,) {'x': 2}iRi(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt	test_bothPs	cCsRddd��Y}|�}tt�|j�ddd�|j|jd�dS(NtXcBseZd�ZRS(cWs||_t��dS(N(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRWs	(t__name__t
__module__R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRVsiii((iii(RRRRR(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_method_argsUs	cCscddd��Y}|�}tt�|j�dddd�|j|jidd6dd6�dS(NRcBseZd�ZRS(c[s||_t��dS(N(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR`s	(RR R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR_sRityi((RRRRR(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_method_kw^s	"cCslddd��Y}|�}tt�|j�ddd�|j|jd�|j|jidd6�dS(NRcBseZd�ZRS(c_s||_||_t��dS(N(RRR(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRis		(RR R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRhsiR"i((i(RRRRRR(RRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_method_bothgs
	cCs*ddd��Y}tt�|��dS(NtTestcBseZd�ZRS(cSsdS(N((RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt__init__ts(RR R&(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR%ss((Rt	TypeError(RR%((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_class_classrscCsAt��}td��WdQX|j|jttd���dS(Nswrong value supplied(RRRtraisedR(Rts((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_raisedzscCs tt��t��WdQXdS(N(Rt
SystemExit(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_catch_baseexception_1s
cCs tt��t��WdQXdS(N(RtKeyboardInterrupt(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_catch_baseexception_2�s
cCs#tt��td��WdQXdS(Nsfoo bar(RR(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt"test_with_exception_class_supplied�s
cCs)ttd���td��WdQXdS(Nsfoo bar(RR(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_with_exception_supplied�scCsly)ttd���td��WdQXWn/tk
rZ}|j|ttd���nX|jd�dS(NRRs6ValueError('bar',) raised, ValueError('foo',) expectedsNo exception raised!(RRR
RRR
(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt'test_with_exception_supplied_wrong_args�scCs t��td��WdQXdS(Nsfoo bar(RR(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_neither_supplied�s
cCs`yttd���WdQXWn/tk
rN}|j|ttd���nX|jd�dS(NRs(None raised, ValueError('foo',) expectedsNo exception raised!(RRR
RRR
(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt$test_with_no_exception_when_expected�s
cCsWyt��WdQXWn/tk
rE}|j|ttd���nX|jd�dS(NsNo exception raised!(RR
RRR
(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt,test_with_no_exception_when_neither_expected�s

cCsAt��}td��WdQX|jttd��|j�dS(Nsfoo bar(RRRRR)(RR*((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt"test_with_getting_raised_exception�scCs>trd}nd}tt|���ddl}WdQXdS(NsNo module named 'textfixtures's$No module named textfixtures.foo.bari����(RRtImportErrorttextfixtures.foo.bar(Rtmessagettextfixtures((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_import_errors_1�s
	cCs)ttd���td��WdQXdS(NR(RR7(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_import_errors_2�scCs?dtfd��Y}t|d���|d��WdQXdS(Nt
FileTypeErrorcBseZd�ZRS(cSs
||_dS(N(tvalue(RR>((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR&�s(RR R&(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR=�sR(t	ExceptionR(RR=((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_custom_exception�scCs�d}dtfd��Y}y'ttd���|�jWdQXWn/tk
rt}|jtt|��|�nX|jd�dS(Ns8KeyError('foo',) raised, AttributeError('foo',) expectedtDodgycBseZd�ZRS(cSs||S(N((Rtname((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt__getattr__�s(RR RC(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRA�sRsNo exception raised!(tdictRtAttributeErrorRR
RRR
(RtexpectedRAR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_assert_keyerror_raised�scCs&ttd��d��}|�dS(NtbadcSstd��dS(NRH(R(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR�s(RR(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_decorator_usage�scCs#tdt��t��WdQXdS(Ntunless(RtFalseRE(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_unless_false_okay�scCs]ytdt��WdQXWn/tk
rK}|j|ttd���nX|jd�dS(NRJsNo exception raised!(RRKR
RRR
(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_unless_false_bad�s
 cCstdt��WdQXdS(NRJ(RtTrue(R((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_unless_true_okay�scCsiy&tdt��td��WdQXWn/tk
rW}|j|ttd���nX|jd�dS(NRJRs4AttributeError('foo',) raised, no exception expectedsNo exception raised!(RRNRER
RRR
(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_unless_true_not_okay�scCs#tdt�d��}|�dS(NRJcSsdS(N((((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR
s(RRN(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_unless_decorator_usagescCs�dtfd��Y}y/t|dd���|dd��WdQXWn:tk
r�}t|�GH|jttd��|�nX|jd�dS(NtAnnoyingExceptioncBseZd�ZRS(c[s|jd�|_dS(Ntother(tgetRS(RR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR&s(RR R&(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyRRsRSRtbazscAnnoyingException() raised, AnnoyingException() expected, attributes differ:
  other:'bar' != 'baz'sNo exception raised!(R?RR
RRRR
(RRRR((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyttest_identical_reprss	($RR R	RRRRRRRRR!R#R$R(R+R-R/R0R1R2R3R4R5R6R;R<R@RGRIRLRMRORPRQRV(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyR
sD		
																			
																N(
ttestfixturesRRRRtunittestRtcompatRR(((sU/opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_should_raise.pyt<module>s