ó {G_Tc@s•dZddlZddlZddlmZejjdkrRejdƒ‚ndefd„ƒYZ d„Z dd l Te d kr‘e ƒndS( uðA module to test whether doctest recognizes some 2.2 features, like static and class methods. >>> print 'yup' # 1 yup We include some (random) encoded (utf-8) text in the text surrounding the example. It should be ignored: ЉЊЈÐЂ iÿÿÿÿN(t test_supportisCannot test docstrings with -O2tCcBs{eZdZd„Zd„Zdefd„ƒYZd„Zd„Ze eeddƒZ e d „ƒZ e d „ƒZRS( uµClass C. >>> print C() # 2 42 We include some (random) encoded (utf-8) text in the text surrounding the example. It should be ignored: ЉЊЈÐЂ cCsdS(s:C.__init__. >>> print C() # 3 42 N((tself((s./usr/local/lib/python2.7/test/test_doctest2.pyt__init__#scCsdS(s. >>> print C() # 4 42 t42((R((s./usr/local/lib/python2.7/test/test_doctest2.pyt__str__*stDcBseZdZd„ZRS(sIA nested D class. >>> print "In D!" # 5 In D! cCsdS(s7 >>> print 3 # 6 3 N((R((s./usr/local/lib/python2.7/test/test_doctest2.pytnested8s(t__name__t __module__t__doc__R(((s./usr/local/lib/python2.7/test/test_doctest2.pyR1scCs|j S(sf >>> c = C() # 7 >>> c.x = 12 # 8 >>> print c.x # 9 -12 (t_x(R((s./usr/local/lib/python2.7/test/test_doctest2.pytgetx>scCs ||_dS(sl >>> c = C() # 10 >>> c.x = 12 # 11 >>> print c.x # 12 -12 N(R (Rtvalue((s./usr/local/lib/python2.7/test/test_doctest2.pytsetxGstdocsh >>> c = C() # 13 >>> c.x = 12 # 14 >>> print c.x # 15 -12 cCsdS(sƒ A static method. >>> print C.statm() # 16 666 >>> print C().statm() # 17 666 iš((((s./usr/local/lib/python2.7/test/test_doctest2.pytstatmWs cCs|S(s‚ A class method. >>> print C.clsm(22) # 18 22 >>> print C().clsm(23) # 19 23 ((tclstval((s./usr/local/lib/python2.7/test/test_doctest2.pytclsmcs (RR R RRtobjectRR Rtpropertytxt staticmethodRt classmethodR(((s./usr/local/lib/python2.7/test/test_doctest2.pyRs      cCsWddlm}d}tj|ƒ\}}||krStjd||fƒ‚ndS(Niÿÿÿÿ(t test_doctest2is expected %d tests to run, not %d(ttestRRt run_doctestt TestFailed(RtEXPECTEDtftt((s./usr/local/lib/python2.7/test/test_doctest2.pyt test_mainos   (t*t__main__( R tsystunittestRRtflagstoptimizetSkipTestRRR tdoctestR(((s./usr/local/lib/python2.7/test/test_doctest2.pyt s  Z