Rev 6078: (jelmer) Couple of minor fixes of tests for the foreign branch plugins. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Aug 17 15:38:23 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6078 [merge]
revision-id: pqm at pqm.ubuntu.com-20110817153820-fadqb9cj9kadzqpy
parent: pqm at pqm.ubuntu.com-20110817133344-q713f20h882e4ag4
parent: jelmer at samba.org-20110816225257-l9c8qzqq065f48nq
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-08-17 15:38:20 +0000
message:
  (jelmer) Couple of minor fixes of tests for the foreign branch plugins.
   (Jelmer Vernooij)
modified:
  bzrlib/tests/per_repository/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
  bzrlib/tests/per_workingtree/test_workingtree.py test_workingtree.py-20060203003124-817757d3e31444fb
=== modified file 'bzrlib/tests/per_repository/test_commit_builder.py'
--- a/bzrlib/tests/per_repository/test_commit_builder.py	2011-07-08 23:01:39 +0000
+++ b/bzrlib/tests/per_repository/test_commit_builder.py	2011-08-16 12:59:04 +0000
@@ -523,7 +523,7 @@
             # Just a couple simple tests to ensure that it actually follows
             # the RevisionTree api.
             self.assertEqual(rev_id, rev_tree.get_revision_id())
-            self.assertEqual([], rev_tree.get_parent_ids())
+            self.assertEqual((), tuple(rev_tree.get_parent_ids()))
         finally:
             tree.unlock()
 

=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py	2011-08-12 14:47:42 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py	2011-08-17 15:38:20 +0000
@@ -278,9 +278,12 @@
         wt = self.make_branch_and_tree('.')
         self.build_tree(['foo/',
                          'foo/hello'])
-        self.assertRaises(NotVersionedError,
-                          wt.add,
-                          'foo/hello')
+        if not wt._format.supports_versioned_directories:
+            wt.add('foo/hello')
+        else:
+            self.assertRaises(NotVersionedError,
+                              wt.add,
+                              'foo/hello')
 
     def test_add_missing(self):
         # adding a msising file -> NoSuchFile
@@ -641,6 +644,9 @@
         # FIXME: This doesn't really test that it works; also this is not
         # implementation-independent. mbp 20070226
         tree = self.make_branch_and_tree('master')
+        if not isinstance(tree, InventoryWorkingTree):
+            raise TestNotApplicable("merge-hashes is specific to bzr "
+                "working trees")
         tree._transport.put_bytes('merge-hashes', 'asdfasdf')
         self.assertRaises(errors.MergeModifiedFormatError, tree.merge_modified)
 




More information about the bazaar-commits mailing list