~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-19 22:34:02 UTC
  • mto: This revision was merged to the branch mainline in revision 6089.
  • Revision ID: jelmer@samba.org-20110819223402-wjywqb0fa1xxx522
Use get_transport_from_{url,path} in more places.

Show diffs side-by-side

added added

removed removed

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