/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-22 15:22:57 UTC
  • mfrom: (6092 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6191.
  • Revision ID: jelmer@samba.org-20110822152257-6z7jx73i59npiauo
merge bzr.dev.

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.
2431
2433
 
2432
2434
        :param relpath: a path relative to the base url.
2433
2435
        """
2434
 
        t = _mod_transport.get_transport(self.get_readonly_url(relpath))
 
2436
        t = _mod_transport.get_transport_from_url(
 
2437
            self.get_readonly_url(relpath))
2435
2438
        self.assertTrue(t.is_readonly())
2436
2439
        return t
2437
2440
 
2571
2574
        propagating. This method ensures than a test did not leaked.
2572
2575
        """
2573
2576
        root = TestCaseWithMemoryTransport.TEST_ROOT
2574
 
        t = _mod_transport.get_transport(root)
 
2577
        t = _mod_transport.get_transport_from_path(root)
2575
2578
        self.permit_url(t.base)
2576
2579
        if (t.get_bytes('.bzr/checkout/dirstate') != 
2577
2580
                TestCaseWithMemoryTransport._SAFETY_NET_PRISTINE_DIRSTATE):
2822
2825
                "a list or a tuple. Got %r instead" % (shape,))
2823
2826
        # It's OK to just create them using forward slashes on windows.
2824
2827
        if transport is None or transport.is_readonly():
2825
 
            transport = _mod_transport.get_transport(".")
 
2828
            transport = _mod_transport.get_transport_from_path(".")
2826
2829
        for name in shape:
2827
2830
            self.assertIsInstance(name, basestring)
2828
2831
            if name[-1] == '/':