~ubuntu-branches/ubuntu/hardy/bzr/hardy-proposed

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Bazaar Package Importer
  • Author(s): Adeodato Simó
  • Date: 2008-03-21 17:56:59 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20080321175659-2qzn8h5axi1oz2x2
Tags: 1.3-1
Final 1.3 release.

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'))