Rev 5870: Add the first invalid delta test. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941
John Arbash Meinel
john at arbash-meinel.com
Thu May 19 10:41:58 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941
------------------------------------------------------------
revno: 5870
revision-id: john at arbash-meinel.com-20110519104149-dcpo5kyzw4o38tbr
parent: john at arbash-meinel.com-20110519102409-m3fmucz042cvc52q
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-set-parent-trees-delta-282941
timestamp: Thu 2011-05-19 12:41:49 +0200
message:
Add the first invalid delta test.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_dirstate.py'
--- a/bzrlib/tests/test_dirstate.py 2011-05-19 10:24:09 +0000
+++ b/bzrlib/tests/test_dirstate.py 2011-05-19 10:41:49 +0000
@@ -2542,7 +2542,7 @@
state.set_state_from_scratch(active_tree.inventory,
[('basis', basis_tree)], [])
self.assertRaises(errors.InconsistentDelta,
- state.update_basis_by_delta, delta, 'target')
+ state.update_basis_by_delta, inv_delta, 'target')
self.assertTrue(state._changes_aborted)
def test_remove_file_matching_active_state(self):
@@ -2662,3 +2662,11 @@
('other-file', 'file-id')],
target=[('file', 'file-id'),
('other-file', 'file-id-2')])
+
+ def test_invalid_file_not_present(self):
+ state = self.assertBadDelta(
+ active=[('file', 'file-id')],
+ basis= [('file', 'file-id')],
+ delta=[('other-file', 'file', 'file-id')])
+
+ # TODO: Test stuff like renaming a directory, and renaming contents therein
More information about the bazaar-commits
mailing list