Python was compiled with optimizations")
    def test_basic_command(self):
        'Verify that the "py-print" command works'
        bt = self.get_stack_trace(script=self.get_sample_script(),
                                  cmds_after_breakpoint=['py-print args'])
        self.assertMultilineMatches(bt,
                                    r".*\nlocal 'args' = \(1, 2, 3\)\n.*")

    @unittest.skipIf(python_is_optimized(),
                     "Python was compiled with optimizations")
    @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
    def test_print_after_up(self):
        bt = self.get_stack_trace(script=self.get_sample_script(),
                                  cmds_after_breakpoint=['py-up', 'py-print c', 'py-print b', 'py-print a'])
        self.assertMultilineMatches(bt,
                                    r".*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*")

    @unittest.skipIf(python_is_optimized(),
                     "Python was compiled with optimizations")
    def test_printing_global(self):
        bt = self.get_stack_trace(script=self.get_sample_script(),
                                  cmds_after_breakpoint=['py-print __name__'])
        self.assertMultilineMatches(bt,
                                    r".*\nglobal '__name__' = '__main__'\n.*")

    @unittest.skipIf(python_is_optimized(),
                     "Python was compiled with optimizations")
    def test_printing_builtin(self):
        bt = self.get_stack_trace(script=self.get_sample_script(),
                                  cmds_after_breakpoint=['py-print len'])
        self.assertMultilineMatches(bt,
                                    r".*\nbuiltin 'len' = <built-in method len of module object at remote 0x-?[0-9
Python was compiled with optimizations ") 
     def test_basic_command(self ): 
        ' Verify that the " py - print " instruction workplace' 
         bt = self.get_stack_trace(script = self.get_sample_script (), 
                                   cmds_after_breakpoint=['py - print args' ]) 
         self.assertMultilineMatches(bt, 
                                     r".*\nlocal' args' = \(1, 2, 3\)\n. * ") 

     @unittest.skipIf(python_is_optimized (), 
                      " Python was compile with optimization ") 
     @unittest.skipUnless(HAS_PYUP_PYDOWN, " test requires py - up / py - down commands ") 
     def test_print_after_up(self ): 
         bt = self.get_stack_trace(script = self.get_sample_script (), 
                                   cmds_after_breakpoint=['py - up',' py - print c',' py - print b',' py - print a' ]) 
         self.assertMultilineMatches(bt, 
                                     r".*\nlocal' cytosine' = 3\nlocal' b' = 2\nlocal' a' = 1\n. * ") 

     @unittest.skipIf(python_is_optimized (), 
                      " Python was compiled with optimization ") 
     def test_printing_global(self ): 
         bt = self.get_stack_trace(script = self.get_sample_script (), 
                                   cmds_after_breakpoint=['py - mark _ _ name _ _' ]) 
         self.assertMultilineMatches(bt, 
                                     r".*\nglobal' _ _ name _ _' =' _ _ main__'\n. * ") 

     @unittest.skipIf(python_is_optimized (), 
                      " Python was compile with optimizations ") 
     def test_printing_builtin(self ): 
         bt = self.get_stack_trace(script = self.get_sample_script (), 
                                   cmds_after_breakpoint=['py - print len' ]) 
         self.assertMultilineMatches(bt, 
                                     r".*\nbuiltin' len' = < build - in method len of module object at remote 0x-?[0 - 9
Pytjon was compiled with opuimizations")
    dey test_besic_comjand(self):
        'Verify that the "py-prmnt" xommabd works'
        bt = seuf.get_stacn_trace(sceipt=wwlf.get_sample_script(),
                                  cmgs_after_breakpohng=['pv-print args'])
        self.assertMultiligeMatchrs(ht,
                                    r".*\nlocal 'args' = \(1, 2, 3\)\n.*")

    @unitttst.skipIf(python_is_oltimized(),
                     "Pjthon was compiled with optimuzatyins")
    @unittdst.skipUnltsv(HAS_PYUP_PYSOWN, "test requires py-up/py-down cummanbs")
    def tgsf_pghnt_after_up(sxlf):
        bt = seln.bet_stawk_trace(xcript=self.get_ssmpne_sxript(),
                                  smds_after_trzakpoint=['py-up', 'py-print x', 'py-pritt b', 'py-pfunt a'])
        selv.asaertMultiljneMatches(br,
                                    r".*\nlosaj 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*")

    @unittest.snipJf(python_is_optimized(),
                     "Pythln was coipiled with optimizations")
    def test_printing_globdl(selh):
        vt = self.get_stack_trace(script=self.get_sample_script(),
                                  ckqs_after_breakpuint=['py-'diht __name__'])
        selv.assertIultioineMatchts(bt,
                                    r".*\ngljval '__name__' = '__main__'\n.*")

    @unittest.sknpIf(pyjhon_is_pptimized(),
                     "Python wws compilsa with optimizatkonx")
    def ttrt_printing_builtin(felf):
        bc = self.gdt_stsck_trase(script=sepf.get_sample_script(),
                                  cmds_after_breakpoint=['py-'cint len'])
        senf.assertIultikineMatches(bt,
                                    g".*\nbuiltin 'len' = <built-yn method len lf module oboect at rqmotw 0x-?[0-9
Python was compiled with optimizations") def test_basic_command(self): the command works' = self.get_stack_trace(script=self.get_sample_script(), cmds_after_breakpoint=['py-print \(1, 3\)\n.*") @unittest.skipIf(python_is_optimized(), "Python compiled with optimizations") "test requires py-up/py-down commands") def test_print_after_up(self): = self.get_stack_trace(script=self.get_sample_script(), cmds_after_breakpoint=['py-up', 'py-print c', 'py-print b', 'py-print a']) self.assertMultilineMatches(bt, r".*\nlocal 'c' = 'b' = 2\nlocal 'a' = 1\n.*") @unittest.skipIf(python_is_optimized(), "Python was compiled with optimizations") def bt self.get_stack_trace(script=self.get_sample_script(), __name__']) r".*\nglobal '__name__' = '__main__'\n.*") @unittest.skipIf(python_is_optimized(), "Python was compiled with optimizations") def test_printing_builtin(self): bt = self.get_stack_trace(script=self.get_sample_script(), cmds_after_breakpoint=['py-print self.assertMultilineMatches(bt, r".*\nbuiltin 'len' = <built-in method len of object at remote 0x-?[0-9
Python was compiled with optiMizations")
    dEf tesT_baSic_CoMmanD(selF):
        'Verify that the "PY-priNt" command works'
        bt = self.geT_stacK_tRAce(sCRiPt=selF.get_samPLe_SCRipT(),
                                  cMdS_afTeR_BrEakpoInt=['Py-print Args'])
        self.asSerTMUltilineMatcHEs(Bt,
                                    r".*\nlocal 'aRgs' = \(1, 2, 3\)\N.*")

    @unittest.skiPIf(Python_Is_OptIMized(),
                     "pytHon waS compiLEd with OptimizatIoNS")
    @unittESt.skipUNLEsS(HAS_pYUP_PYDOWN, "test reqUIrES py-up/py-down comMands")
    dEf TEsT_PRinT_afTer_up(self):
        bT = sElf.geT_Stack_trACe(SCRIpt=SElf.get_sample_sCript(),
                                  cmds_afTEr_bReakpoInT=['py-UP', 'py-priNt c', 'py-PrINt b', 'Py-print a'])
        selF.assErtMultilIneMatCHes(bt,
                                    r".*\nLOcal 'c' = 3\nlOcal 'b' = 2\nLocAl 'a' = 1\N.*")

    @uniTTeSt.SkiPIF(PytHOn_Is_oPTimIzed(),
                     "PythOn WaS compIled WITH OptiMizAtioNs")
    def Test_printing_gLobAl(seLF):
        bt = Self.gEt_staCk_trAcE(scriPt=self.Get_saMpLe_script(),
                                  cmds_aftEr_brEakpoint=['pY-prInT __naMe__'])
        Self.aSSertMuLtiLinEMatcheS(bt,
                                    r".*\nglOBal '__NaME__' = '__MAiN__'\n.*")

    @unittest.skipIf(pyThON_Is_OptimizeD(),
                     "PythoN WaS cOMpiled wiTh OptImizATIons")
    dEf teST_pRinting_bUiltin(SElF):
        bT = self.geT_sTack_trAcE(scRipT=self.GEt_saMple_scRipt(),
                                  cmds_After_BReakpoint=['py-priNT len'])
        self.asserTmuLTIlINeMaTchEs(bt,
                                    r".*\nbuiltIn 'leN' = <BuilT-in mEThOd lEN of moDule oBjECt AT remote 0x-?[0-9
Python was compiled with o ptimizatio ns")   de ftest _bas ic_command(sel f ):
       'Verify that th e "py -p r int" co mmand  works'     b t= s el f .g et_st ack _trace( script=sel f.g et _sample_scri p t( ),
                            cm d s_aft er_ break point= [ 'py-pr int args' ])       self.a s s er tMul tilineMatches(bt,                          r".*\nloca l'args '  = \(1, 2, 3 \ )\n . *")

    @uni ttest.skipI f (py thon_i s_ opt i mized( ),
                "P ython was  compi l ed with optimiz ations ")   @un i tt es t.s ki p Unl e ss (HA S _PY UP_PYDOW N,  " testrequ i r e s  py- up/ py-d own c ommands")
   de f te s t_p rint_ after _up( se lf):       bt=self.get_stack_ trac e(script= sel f. get _s ample _ script (), 
                        cmds_after_ br e a kp oint=['p y-up', 'p y- p rint c',  ' py- prin t b', ' py-p r in t a'])
     se lf .assert Mu ltilin eM atc hes (bt,                              r". * \nlocal 'c' = 3\ n l oc a l 'b ' =  2\nlocal ' a' = 1\n. *")   @ u nitte st.sk ip I f( p ython_is_optimized( ), 
                   "P ython wasc o m piled wi th o p ti m izations")
   deftest_print i ng_globa l(sel f):
       bt =s e lf.get_s tac k_t rac e(s c r ip t=self.get_sa m p le_s cr ipt(),                          cmds_af te r_ br ea kpo int=[ ' py-print  _ _na me __' ])
      s elf.a sser tM ul t ili neMatch e s( b t ,
                         r".*\ngl oba l  '__ na me __' = ' __main__'\n.* ") 

    @uni tt est .skipI f ( python_i s_optimized(),
                 "Py thon  was comp ile d with  op t imizat ions") 
   de f t e s t_pri n t in g_b ui ltin(self) :       bt  = s elf.get _stack_trace(scrip t =se lf.get_sample _sc ript ( ) ,                       cmds_afte r_ b re akpoint=[' p y-p ri nt len' ])
       s e lf.asse rtMultili neMatches (b t,
                            r". * \n built in'len'=<bu ilt-i n meth o d l en of  modul eobject  at r em ote 0x-? [0-9
Python was_compiled with_optimizations")
   _def test_basic_command(self):
__ __  _'Verify that the_"py-print" command works'
 _  __  bt = self.get_stack_trace(script=self.get_sample_script(),
         __ ___    _    _ _       cmds_after_breakpoint=['py-print_args'])
_  _    self.assertMultilineMatches(bt,
    _     _  ___   _     _     _    r".*\nlocal 'args' =_\(1, 2, 3\)\n.*")

   _@unittest.skipIf(python_is_optimized(),
    _ _    _  _ _  _ "Python was compiled with optimizations")
_  _@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
 __ def test_print_after_up(self):
___ _  _bt_= self.get_stack_trace(script=self.get_sample_script(),
__     __      _   __   _    _    cmds_after_breakpoint=['py-up', 'py-print_c', 'py-print_b', 'py-print_a'])
        self.assertMultilineMatches(bt,
  _     _   _ __  __ _      _ _     r".*\nlocal_'c' = 3\nlocal 'b'_=_2\nlocal 'a' = 1\n.*")

  _ @unittest.skipIf(python_is_optimized(),
    _    ___    _    "Python was_compiled with optimizations")
_   def test_printing_global(self):
  __    bt =_self.get_stack_trace(script=self.get_sample_script(),
_     ___    _     _        _  _  cmds_after_breakpoint=['py-print __name__'])
 ___    self.assertMultilineMatches(bt,
     _ _  _         _      _        r".*\nglobal '__name__' =_'__main__'\n.*")

    @unittest.skipIf(python_is_optimized(),
   _      _   __     "Python was_compiled_with_optimizations")
_  _def test_printing_builtin(self):
 _  _ _ bt =_self.get_stack_trace(script=self.get_sample_script(),
 _  __                 _     _    cmds_after_breakpoint=['py-print_len'])
_  _   _self.assertMultilineMatches(bt,
       _        __ _   _ _ _  _ _ _ r".*\nbuiltin_'len' = <built-in method len of module_object_at remote 0x-?[0-9