~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

Split out win32 specific code so that it can be tested on all platforms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
        # Not a valid _win32 url, no drive letter
272
272
        self.assertRaises(InvalidURL, from_url, 'file:///path/to/foo')
273
273
 
 
274
    def test__win32_extract_drive_letter(self):
 
275
        extract = urlutils._win32_extract_drive_letter
 
276
        self.assertEqual(('file:///C:', '/foo'), extract('file://', '/C:/foo'))
 
277
        self.assertEqual(('file:///d|', '/path'), extract('file://', '/d|/path'))
 
278
        self.assertRaises(InvalidURL, extract, 'file://', '/path')
 
279
 
274
280
    def test_split(self):
275
281
        # Test bzrlib.urlutils.split()
276
282
        split = urlutils.split