~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Alexander Belchenko
  • Date: 2008-03-17 22:16:52 UTC
  • mfrom: (3290 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3295.
  • Revision ID: bialix@ukr.net-20080317221652-gwq1ohxini63zhum
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
            raise TestSkipped("local encoding cannot handle unicode")
292
292
 
293
293
        self.assertEqual('file:///path/to/r%C3%A4ksm%C3%B6rg%C3%A5s', result)
 
294
        self.assertFalse(isinstance(result, unicode))
294
295
 
295
296
    def test_posix_local_path_from_url(self):
296
297
        from_url = urlutils._posix_local_path_from_url
322
323
            raise TestSkipped("local encoding cannot handle unicode")
323
324
 
324
325
        self.assertEqual('file:///D:/path/to/r%C3%A4ksm%C3%B6rg%C3%A5s', result)
 
326
        self.assertFalse(isinstance(result, unicode))
325
327
 
326
328
    def test_win32_unc_path_to_url(self):
327
329
        to_url = urlutils._win32_local_path_to_url
336
338
            raise TestSkipped("local encoding cannot handle unicode")
337
339
 
338
340
        self.assertEqual('file://HOST/path/to/r%C3%A4ksm%C3%B6rg%C3%A5s', result)
339
 
 
 
341
        self.assertFalse(isinstance(result, unicode))
340
342
 
341
343
    def test_win32_local_path_from_url(self):
342
344
        from_url = urlutils._win32_local_path_from_url
491
493
    def test_escape(self):
492
494
        self.assertEqual('%25', urlutils.escape('%'))
493
495
        self.assertEqual('%C3%A5', urlutils.escape(u'\xe5'))
 
496
        self.assertFalse(isinstance(urlutils.escape(u'\xe5'), unicode))
494
497
 
495
498
    def test_unescape(self):
496
499
        self.assertEqual('%', urlutils.unescape('%25'))