{G_Tc@sddZddlZddlmZmZdejfdYZdZedkr`endS(sFTest compiler changes for unary ops (+, -, ~) introduced in Python 2.2iN(t run_unittestt have_unicodetUnaryOpTestCasecBs>eZdZdZdZdZdZdZRS(cCsv|jdd k|jddk|jd dk|jdd k|jdd k|jddkdS(Niiillgg@yy@iilgy(t assertTrue(tself((s+/usr/local/lib/python2.7/test/test_unary.pyt test_negatives cCs}|jd dk|jd dk|jd dk|jd dk|jd dk|jd dkdS(Niilg@y@(R(R((s+/usr/local/lib/python2.7/test/test_unary.pyt test_positives cCsP|jddk|jddk|jddk|jddkdS( Niiilliil(R(R((s+/usr/local/lib/python2.7/test/test_unary.pyt test_invertscCsdd}|jtd|td|dk|jtd|td|dk|jtd|td|dkdS(Nt9i t+tLt-t~(Rteval(Rtnines((s+/usr/local/lib/python2.7/test/test_unary.pyttest_no_overflows ++cCsD|jd d|jd d|jd d|jd ddS(Niiiiiiiiiiiii(t assertEqual(R((s+/usr/local/lib/python2.7/test/test_unary.pyttest_negation_of_exponentiation$scCsrxEdD]=}|jtt|dtr|jtt|dqqW|jttd|jttddS( NR R R s'a'su'a's~2js~2.0(R R R (t assertRaisest TypeErrorR R(Rtop((s+/usr/local/lib/python2.7/test/test_unary.pyttest_bad_types,s  (t__name__t __module__RRRRRR(((s+/usr/local/lib/python2.7/test/test_unary.pyRs      cCsttdS(N(RR(((s+/usr/local/lib/python2.7/test/test_unary.pyt test_main6st__main__( t__doc__tunittestttest.test_supportRRtTestCaseRRR(((s+/usr/local/lib/python2.7/test/test_unary.pyts  0