~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: John Arbash Meinel
  • Date: 2006-04-25 15:05:42 UTC
  • mfrom: (1185.85.85 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060425150542-c7b518dca9928691
[merge] the old bzr-encoding changes, reparenting them on bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import sys
27
27
 
28
28
from bzrlib.errors import (DirectoryNotEmpty, NoSuchFile, FileExists,
29
 
                           LockError,
30
 
                           PathError,
31
 
                           TransportNotPossible, ConnectionError)
 
29
                           LockError, PathError,
 
30
                           TransportNotPossible, ConnectionError,
 
31
                           InvalidURL)
32
32
from bzrlib.tests import TestCaseInTempDir, TestSkipped
33
33
from bzrlib.transport import memory, urlescape
34
34
import bzrlib.transport
897
897
        paths = set(sub_transport.iter_files_recursive())
898
898
        self.assertEqual(set(['dir/foo', 'dir/bar', 'bar']), paths)
899
899
 
 
900
    def test_unicode_paths(self):
 
901
        # jam 20060425 Intentional wart so that we can remember 
 
902
        #      to get this working again
 
903
        print 'Unicode path testing disabled for now'
 
904
        raise TestSkipped('This test is disabled until unicode support is worked out')
 
905
        t = self.get_transport()
 
906
 
 
907
        files = [u'\xe5', # a w/ circle iso-8859-1
 
908
                 u'\xe4', # a w/ dots iso-8859-1
 
909
                 u'\u017d', # Z with umlat iso-8859-2
 
910
                 u'\u062c', # Arabic j
 
911
                 u'\u0410', # Russian A
 
912
                 u'\u65e5', # Kanji person
 
913
                ]
 
914
 
 
915
        self.build_tree(files, transport=t)
 
916
 
 
917
        # A plain unicode string is not a valid url
 
918
        for fname in files:
 
919
            self.assertRaises(InvalidURL, t.get, fname)
 
920
 
 
921
        for fname in files:
 
922
            fname_utf8 = fname.encode('utf-8')
 
923
            contents = 'contents of %s\n' % (fname_utf8,)
 
924
            self.check_transport_contents(contents, t, urlescape(fname))
 
925
 
900
926
    def test_connect_twice_is_same_content(self):
901
927
        # check that our server (whatever it is) is accessable reliably
902
928
        # via get_transport and multiple connections share content.