usr/lib64/python2.7/unittest/test/test_assertions.pyc000064400000032172147204774100016664 0ustar00 {fc@sgddlZddlZdejfdYZdejfdYZedkrcejndS(iNtTest_AssertionscBs,eZdZdZdZdZRS(cCsH|jdd|jdd|j|j|jdd|j|j|jdd|jdddd|j|j|jdddd|jdd dd|jdd dd|j|j|jdd dd|j|j|jdddd|jtd td |j|j|jtd td dS(Ng1?g?g?g?tplacesiig?y?tinfy??y??y??y??(tassertAlmostEqualtassertNotAlmostEqualt assertRaisestfailureExceptiontfloat(tself((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttest_AlmostEquals$     c Cs|jdddd|jdddd|jdddd|jdddd|jdddd|j|j|jdddd|j|j|jdddd|j|j|jdddd|jt|jdddddd|jt|jddddddtjj}|tjdd }|j||dtjdd |j||dtjdd dS( Ng?g?tdeltag?g?Ritsecondsi ii(RRRRt TypeErrortdatetimetnowt timedelta(Rtfirsttsecond((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttest_AmostEqualWithDeltas*c Csd}|jt|t|jt|tdy|jtdWn)|jk rw}|jd|jnX|jdy|jt|tWntk rnX|jd|jt*}y tWntk r}nXWdQX|j|j ||jttdWdQXy|jtWdQXWn)|jk rr}|jd|jnX|jdy |jt tWdQXWntk rnX|jddS(NcSs |dS(N((te((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt_raise:stkeycSsdS(N(tNone(((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt?tsKeyError not raisedsassertRaises() didn't fails0assertRaises() didn't let exception pass through( RtKeyErrorRtassertIntargstfailt ValueErrort ExceptiontassertIst exception(RRRtcm((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttest_assertRaises9sB         cCs|jddy|jdddWnD|jk rm}|jd|jd|jd|jdnX|jddS(Ns Ala ma kotasr+sk.ttMessages'kot'is*assertNotRegexpMatches should have failed.(tassertNotRegexpMatchesRRRR(RR((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertNotRegexpMatchesbs(t__name__t __module__R RR"R%(((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyRs   )tTestLongMessagecBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(sTest that the individual asserts honour longMessage. This actually tests all the message behaviour for asserts that use longMessage.cs`dtjffdY}dtjffdY}|d_|d_dS(NtTestableTestFalsecs eZeZjZdZRS(cSsdS(N((R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestTestws(R&R'tFalset longMessageRR*((R(s5/usr/lib64/python2.7/unittest/test/test_assertions.pyR)ss tTestableTestTruecs eZeZjZdZRS(cSsdS(N((R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyR*~s(R&R'tTrueR,RR*((R(s5/usr/lib64/python2.7/unittest/test/test_assertions.pyR-zs R*(tunittesttTestCaset testableTruet testableFalse(RR)R-((Rs5/usr/lib64/python2.7/unittest/test/test_assertions.pytsetUprscCs|jtjjdS(N(t assertFalseR/R0R,(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt testDefaultscCs|j|jjddd|j|jjddd|j|jjddd|j|jjddd|jjtddS(Ntfootbars bar : foo(t assertEqualR2t_formatMessageRR1tobject(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttest_formatMsgs cCs6djdtdD}|jj|ddS(NRcss|]}t|VqdS(N(tchr(t.0ti((s5/usr/lib64/python2.7/unittest/test/test_assertions.pys siu�(tjointrangeR1R9(Rtone((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt test_formatMessage_unicode_errorsc sfd}xxt|D]j\}}||}i}|d} | r]idd6}njjd||||WdQXqWdS(Ncs4|dk}|rj}n j}t|S(Ni(R2R1tgetattr(R>tuseTestableFalsettest(t methodNameR(s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt getMethods    itoopstmsgtexpected_regexp(t enumeratetassertRaisesRegexpR( RRFRterrorsRGR>RJt testMethodtkwargstwithMsg((RFRs5/usr/lib64/python2.7/unittest/test/test_assertions.pytassertMessagess   cCs&|jdtfddddgdS(Nt assertTrues^False is not true$s^oops$s^False is not true : oops$(RQR+(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertTrues cCs&|jdtfddddgdS(NR4s^True is not false$s^oops$s^True is not false : oops$(RQR.(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertFalses cCs#|jddddddgdS(NtassertNotEqualis^1 == 1$s^oops$s^1 == 1 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt testNotEquals  cCs#|jddddddgdS(NRiis^1 != 2 within 7 places$s^oops$s^1 != 2 within 7 places : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAlmostEquals cCs#|jddddddgdS(NRis^1 == 1 within 7 places$s^oops$s^1 == 1 within 7 places : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestNotAlmostEquals cCs#|jddddddgdS(Nt_baseAssertEqualiis^1 != 2$s^oops$s^1 != 2 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttest_baseAssertEquals cCs,|jdgdgfddddgdS(NtassertSequenceEquals \+ \[None\]$s^oops$s\+ \[None\] : oops$(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertSequenceEquals cCs5|jdttdgfddddgdS(NtassertSetEqualsNone$s^oops$s None : oops$(RQtsetR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertSetEquals cCs)|jddgfddddgdS(NRs^None not found in \[\]$s^oops$s^None not found in \[\] : oops$(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt testAssertInscCs,|jdddgfddddgdS(Nt assertNotIns%^None unexpectedly found in \[None\]$s^oops$s,^None unexpectedly found in \[None\] : oops$(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertNotInscCs0|jdiidd6fddddgdS(NtassertDictEqualtvalueRs\+ \{'key': 'value'\}$s^oops$s\+ \{'key': 'value'\} : oops$(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertDictEqualscCs0|jdidd6ifddddgdS(NtassertDictContainsSubsetRdRs^Missing: 'key'$s^oops$s^Missing: 'key' : oops$(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertDictContainsSubsetscCs#|jddddddgdS(NtassertMultiLineEqualRR6s\+ foo$s^oops$s\+ foo : oops$(RR6(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertMultiLineEquals cCs#|jddddddgdS(Nt assertLessiis^2 not less than 1$s^oops$s^2 not less than 1 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertLesss cCs#|jddddddgdS(NtassertLessEqualiis^2 not less than or equal to 1$s^oops$s&^2 not less than or equal to 1 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertLessEquals cCs#|jddddddgdS(Nt assertGreateriis^1 not greater than 2$s^oops$s^1 not greater than 2 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertGreaters cCs#|jddddddgdS(NtassertGreaterEqualiis"^1 not greater than or equal to 2$s^oops$s)^1 not greater than or equal to 2 : oops$(ii(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertGreaterEquals cCs#|jddddddgdS(Nt assertIsNonesnot Nones^'not None' is not None$s^oops$s^'not None' is not None : oops$(snot None(RQ(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertIsNones cCs#|jddddddgdS(NtassertIsNotNones^unexpectedly None$s^oops$s^unexpectedly None : oops$(N(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertIsNotNones cCs#|jddddddgdS(NRR6s^None is not 'foo'$s^oops$s^None is not 'foo' : oops$(NR6(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyt testAssertIss cCs#|jddddddgdS(Nt assertIsNots^unexpectedly identical: None$s^oops$s%^unexpectedly identical: None : oops$(NN(RQR(R((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyttestAssertIsNots (R&R't__doc__R3R5R;RBRQRSRTRVRWRXRZR\R_R`RbReRgRiRkRmRoRqRsRuRvRx(((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyR(ms6                        t__main__(R R/R0RR(R&tmain(((s5/usr/lib64/python2.7/unittest/test/test_assertions.pyts  g