Rev 4641: Cleanups, ready to record. in file:///home/vila/src/bzr/experimental/conflict-manager/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Dec 21 19:58:18 GMT 2009
At file:///home/vila/src/bzr/experimental/conflict-manager/
------------------------------------------------------------
revno: 4641
revision-id: v.ladeuil+lp at free.fr-20091221195817-uu8ary2oul3koo6l
parent: v.ladeuil+lp at free.fr-20091216112551-gh9ophcqvycvptjm
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: description
timestamp: Mon 2009-12-21 20:58:17 +0100
message:
Cleanups, ready to record.
* bzrlib/tests/test_conflicts.py:
Align with submitted refacorting.
* BRANCH.TODO:
Fix typo.
-------------- next part --------------
=== modified file 'BRANCH.TODO'
--- a/BRANCH.TODO 2009-11-05 16:36:46 +0000
+++ b/BRANCH.TODO 2009-12-21 19:58:17 +0000
@@ -160,7 +160,8 @@
- manually rename <children>
resolve:
-- nothing to do nothing more than the conflicted objects have been created
+- nothing more to do than removing the conflicted objects that
+ have been created
Missing parent
=== modified file 'bzrlib/tests/test_conflicts.py'
--- a/bzrlib/tests/test_conflicts.py 2009-12-10 17:10:38 +0000
+++ b/bzrlib/tests/test_conflicts.py 2009-12-21 19:58:17 +0000
@@ -55,40 +55,6 @@
])
-class TestConflictStanzas(tests.TestCase):
-
- def test_stanza_roundtrip(self):
- # write and read our example stanza.
- stanza_iter = example_conflicts.to_stanzas()
- processed = conflicts.ConflictList.from_stanzas(stanza_iter)
- for o, p in zip(processed, example_conflicts):
- self.assertEqual(o, p)
-
- self.assertIsInstance(o.path, unicode)
-
- if o.file_id is not None:
- self.assertIsInstance(o.file_id, str)
-
- conflict_path = getattr(o, 'conflict_path', None)
- if conflict_path is not None:
- self.assertIsInstance(conflict_path, unicode)
-
- conflict_file_id = getattr(o, 'conflict_file_id', None)
- if conflict_file_id is not None:
- self.assertIsInstance(conflict_file_id, str)
-
- def test_stanzification(self):
- for stanza in example_conflicts.to_stanzas():
- if 'file_id' in stanza:
- # In Stanza form, the file_id has to be unicode.
- self.assertStartsWith(stanza['file_id'], u'\xeed')
- self.assertStartsWith(stanza['path'], u'p\xe5th')
- if 'conflict_path' in stanza:
- self.assertStartsWith(stanza['conflict_path'], u'p\xe5th')
- if 'conflict_file_id' in stanza:
- self.assertStartsWith(stanza['conflict_file_id'], u'\xeed')
-
-
class TestConflicts(tests.TestCaseWithTransport):
def test_conflicts(self):
@@ -174,6 +140,40 @@
self.assertEqual(conflicts.ConflictList([]), tree.conflicts())
+class TestConflictStanzas(tests.TestCase):
+
+ def test_stanza_roundtrip(self):
+ # write and read our example stanza.
+ stanza_iter = example_conflicts.to_stanzas()
+ processed = conflicts.ConflictList.from_stanzas(stanza_iter)
+ for o, p in zip(processed, example_conflicts):
+ self.assertEqual(o, p)
+
+ self.assertIsInstance(o.path, unicode)
+
+ if o.file_id is not None:
+ self.assertIsInstance(o.file_id, str)
+
+ conflict_path = getattr(o, 'conflict_path', None)
+ if conflict_path is not None:
+ self.assertIsInstance(conflict_path, unicode)
+
+ conflict_file_id = getattr(o, 'conflict_file_id', None)
+ if conflict_file_id is not None:
+ self.assertIsInstance(conflict_file_id, str)
+
+ def test_stanzification(self):
+ for stanza in example_conflicts.to_stanzas():
+ if 'file_id' in stanza:
+ # In Stanza form, the file_id has to be unicode.
+ self.assertStartsWith(stanza['file_id'], u'\xeed')
+ self.assertStartsWith(stanza['path'], u'p\xe5th')
+ if 'conflict_path' in stanza:
+ self.assertStartsWith(stanza['conflict_path'], u'p\xe5th')
+ if 'conflict_file_id' in stanza:
+ self.assertStartsWith(stanza['conflict_file_id'], u'\xeed')
+
+
# FIXME: Tests missing for DuplicateID conflict type
class TestResolveConflicts(script.TestCaseWithTransportAndScript):
More information about the bazaar-commits
mailing list