Rev 2323: Skip new tests that depend on unicode file paths. in http://people.ubuntu.com/~robertc/baz2.0/integration
Robert Collins
robertc at robertcollins.net
Wed Mar 7 09:11:19 GMT 2007
At http://people.ubuntu.com/~robertc/baz2.0/integration
------------------------------------------------------------
revno: 2323
revision-id: robertc at robertcollins.net-20070307091110-ga6qtkb917x13a0j
parent: robertc at robertcollins.net-20070307080258-fi172acyjga89fz5
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Wed 2007-03-07 20:11:10 +1100
message:
Skip new tests that depend on unicode file paths.
modified:
bzrlib/tests/test_workingtree_4.py test_workingtree_4.p-20070223025758-531n3tznl3zacv2o-1
bzrlib/tests/tree_implementations/__init__.py __init__.py-20060717075546-420s7b0bj9hzeowi-2
=== modified file 'bzrlib/tests/test_workingtree_4.py'
--- a/bzrlib/tests/test_workingtree_4.py 2007-03-07 03:09:14 +0000
+++ b/bzrlib/tests/test_workingtree_4.py 2007-03-07 09:11:10 +0000
@@ -416,8 +416,14 @@
tree.commit('a')
tree.add(['b'], ['b-id'])
- tree.rename_one('a', u'b\xb5rry')
- self.assertEqual(u'b\xb5rry', tree.id2path('a-id'))
+ try:
+ tree.rename_one('a', u'b\xb5rry')
+ new_path = u'b\xb5rry'
+ except UnicodeEncodeError:
+ # support running the test on non-unicode platforms
+ tree.rename_one('a', 'c')
+ new_path = 'c'
+ self.assertEqual(new_path, tree.id2path('a-id'))
tree.commit(u'b\xb5rry')
tree.unversion(['a-id'])
self.assertRaises(errors.NoSuchId, tree.id2path, 'a-id')
=== modified file 'bzrlib/tests/tree_implementations/__init__.py'
--- a/bzrlib/tests/tree_implementations/__init__.py 2007-03-07 01:14:11 +0000
+++ b/bzrlib/tests/tree_implementations/__init__.py 2007-03-07 09:11:10 +0000
@@ -37,6 +37,7 @@
default_transport,
TestCaseWithTransport,
TestLoader,
+ TestSkipped,
TestSuite,
)
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
@@ -207,7 +208,11 @@
'1file-in-1topdir',
'0dir-in-1topdir'
]
- self.build_tree(paths)
+ try:
+ self.build_tree(paths)
+ except UnicodeError:
+ raise TestSkipped(
+ 'This platform does not support unicode file paths.')
tree.add(paths, ids)
tt = transform.TreeTransform(tree)
root_transaction_id = tt.trans_id_tree_path('')
More information about the bazaar-commits
mailing list