At http://bazaar.launchpad.net/%7Ebzr/bzr/osx_tests_fix
------------------------------------------------------------
revno: 3653
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Vincent Ladeuil <[EMAIL PROTECTED]>
branch nick: osx_tests_fix
timestamp: Mon 2008-09-08 16:50:15 +0200
message:
Fix test_case_insensitive_clash to pass on all platforms (renamed too).
* bzrlib/tests/test_transform.py:
(TestTreeTransform.test_rollback_on_directory_clash): Renamed from
test_case_insensitive_clash and changed to pass on all platforms.
modified:
bzrlib/tests/test_transform.py
test_transaction.py-20060105172520-b3ffb3946550e6c4
=== modified file 'bzrlib/tests/test_transform.py'
--- a/bzrlib/tests/test_transform.py 2008-08-29 00:35:38 +0000
+++ b/bzrlib/tests/test_transform.py 2008-09-08 14:50:15 +0000
@@ -1162,22 +1162,28 @@
transform.cancel_creation(parent)
transform.finalize()
- def test_case_insensitive_clash(self):
- self.requireFeature(CaseInsensitiveFilesystemFeature)
+ def test_rollback_on_directory_clash(self):
+ wt = self.make_branch_and_tree('.')
+ wt.add
def tt_helper():
- wt = self.make_branch_and_tree('.')
tt = TreeTransform(wt) # TreeTransform obtains write lock
try:
- tt.new_file('foo', tt.root, 'bar')
- tt.new_file('Foo', tt.root, 'spam')
+ foo = tt.new_directory('foo', tt.root)
+ tt.new_file('bar', foo, 'foobar')
+ baz = tt.new_directory('baz', tt.root)
+ tt.new_file('qux', baz, 'quux')
+ # Ask for a rename 'foo' -> 'baz'
+ tt.adjust_path('baz', tt.root, foo)
# Lie to tt that we've already resolved all conflicts.
tt.apply(no_conflicts=True)
except:
wt.unlock()
raise
+ # It will fail the renaming because the target directory is not empty
+ # (but raise FileExists anyway).
err = self.assertRaises(errors.FileExists, tt_helper)
self.assertContainsRe(str(err),
- "^File exists: .+/foo")
+ "^File exists: .+/baz")
def test_two_directories_clash(self):
def tt_helper():
@@ -1186,6 +1192,7 @@
try:
foo_1 = tt.new_directory('foo', tt.root)
tt.new_directory('bar', foo_1)
+ # Adding the same directory with a different content
foo_2 = tt.new_directory('foo', tt.root)
tt.new_directory('baz', foo_2)
# Lie to tt that we've already resolved all conflicts.
@@ -1204,6 +1211,7 @@
try:
foo_1 = tt.new_directory('foo', tt.root)
tt.new_directory('bar', foo_1)
+ # Adding the same directory with a different content
foo_2 = tt.new_directory('foo', tt.root)
tt.new_directory('baz', foo_2)
# Lie to tt that we've already resolved all conflicts.
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits