~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Ian Clatworthy
  • Date: 2010-02-19 03:02:07 UTC
  • mto: (4797.23.1 integration-2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: ian.clatworthy@canonical.com-20100219030207-zpbzx021zavx4sqt
What's New in 2.1 - a summary of changes since 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""Tests for the urlutils wrapper."""
18
18
 
19
19
import os
20
 
import re
21
20
import sys
22
21
 
23
22
from bzrlib import osutils, urlutils, win32utils
300
299
            from_url('file:///path/to/r%C3%A4ksm%C3%B6rg%C3%A5s'))
301
300
        self.assertEqual(u'/path/to/r\xe4ksm\xf6rg\xe5s',
302
301
            from_url('file:///path/to/r%c3%a4ksm%c3%b6rg%c3%a5s'))
 
302
        self.assertEqual(u'/path/to/r\xe4ksm\xf6rg\xe5s',
 
303
            from_url('file://localhost/path/to/r%c3%a4ksm%c3%b6rg%c3%a5s'))
303
304
 
304
305
        self.assertRaises(InvalidURL, from_url, '/path/to/foo')
 
306
        self.assertRaises(
 
307
            InvalidURL, from_url,
 
308
            'file://remotehost/path/to/r%c3%a4ksm%c3%b6rg%c3%a5s')
305
309
 
306
310
    def test_win32_local_path_to_url(self):
307
311
        to_url = urlutils._win32_local_path_to_url