~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-06-15 04:32:49 UTC
  • mfrom: (5254.2.5 534787-pull-lp-in-config)
  • Revision ID: pqm@pqm.ubuntu.com-20100615043249-b5xx4yeyfyfbfyav
(spiv) Fix 'bzr pull' when lp: URL explicitly defined in
        locations.conf or branch.conf. (Gordon Tyler, #534787)

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
            dirname('path/to/foo/', exclude_trailing_slash=False))
196
196
        self.assertEqual('path/..', dirname('path/../foo'))
197
197
        self.assertEqual('../path', dirname('../path/foo'))
 
198
    
 
199
    def test_is_url(self):
 
200
        self.assertTrue(urlutils.is_url('http://foo/bar'))
 
201
        self.assertTrue(urlutils.is_url('bzr+ssh://foo/bar'))
 
202
        self.assertTrue(urlutils.is_url('lp:foo/bar'))
 
203
        self.assertTrue(urlutils.is_url('file:///foo/bar'))
 
204
        self.assertFalse(urlutils.is_url(''))
 
205
        self.assertFalse(urlutils.is_url('foo'))
 
206
        self.assertFalse(urlutils.is_url('foo/bar'))
 
207
        self.assertFalse(urlutils.is_url('/foo'))
 
208
        self.assertFalse(urlutils.is_url('/foo/bar'))
 
209
        self.assertFalse(urlutils.is_url('C:/'))
 
210
        self.assertFalse(urlutils.is_url('C:/foo'))
 
211
        self.assertFalse(urlutils.is_url('C:/foo/bar'))
198
212
 
199
213
    def test_join(self):
200
214
        def test(expected, *args):