~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-20 11:49:38 UTC
  • mfrom: (6082.3.4 412201-mv-case-insensitive)
  • Revision ID: pqm@pqm.ubuntu.com-20110820114938-wwxmzhexrielxpq3
(vila) Allow blackbox tests and test scripts interactive debugging. (Vincent
 Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1009
1009
    def debug(self):
1010
1010
        # debug a frame up.
1011
1011
        import pdb
1012
 
        pdb.Pdb().set_trace(sys._getframe().f_back)
 
1012
        # The sys preserved stdin/stdout should allow blackbox tests debugging
 
1013
        pdb.Pdb(stdin=sys.__stdin__, stdout=sys.__stdout__
 
1014
                ).set_trace(sys._getframe().f_back)
1013
1015
 
1014
1016
    def discardDetail(self, name):
1015
1017
        """Extend the addDetail, getDetails api so we can remove a detail.