28
28
from bzrlib.errors import (DirectoryNotEmpty, NoSuchFile, FileExists,
31
TransportNotPossible, ConnectionError)
30
TransportNotPossible, ConnectionError,
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)
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()
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
915
self.build_tree(files, transport=t)
917
# A plain unicode string is not a valid url
919
self.assertRaises(InvalidURL, t.get, fname)
922
fname_utf8 = fname.encode('utf-8')
923
contents = 'contents of %s\n' % (fname_utf8,)
924
self.check_transport_contents(contents, t, urlescape(fname))
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.