Rev 6110: (jelmer) Various improvements to the testsuite to allow running against in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Aug 29 14:12:45 UTC 2011


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

------------------------------------------------------------
revno: 6110 [merge]
revision-id: pqm at pqm.ubuntu.com-20110829141242-gqvd3pz0tdcgnhfy
parent: pqm at pqm.ubuntu.com-20110829120149-68n9rlsc5b0ft4wc
parent: jelmer at samba.org-20110827000140-j9ffuizwhrmqaznz
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-08-29 14:12:42 +0000
message:
  (jelmer) Various improvements to the testsuite to allow running against
   foreign branches. (Jelmer Vernooij)
modified:
  bzrlib/tests/per_branch/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
  bzrlib/tests/per_branch/test_create_checkout.py test_create_checkout-20070322193723-n2wkp1g03r0404di-1
  bzrlib/tests/per_branch/test_tags.py test_tags.py-20070212110545-w2s799hm2jlbsmg5-1
  bzrlib/tests/per_repository/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
=== modified file 'bzrlib/tests/per_branch/test_branch.py'
--- a/bzrlib/tests/per_branch/test_branch.py	2011-07-23 16:33:38 +0000
+++ b/bzrlib/tests/per_branch/test_branch.py	2011-08-27 00:01:40 +0000
@@ -622,7 +622,9 @@
 class TestChildSubmitFormats(per_branch.TestCaseWithBranch):
 
     def test_get_child_submit_format_default(self):
-        self.assertEqual(None, self.get_branch().get_child_submit_format())
+        submit_format = self.get_branch().get_child_submit_format()
+        self.assertTrue(submit_format is None or
+                        isinstance(submit_format, str))
 
     def test_get_child_submit_format(self):
         branch = self.get_branch()

=== modified file 'bzrlib/tests/per_branch/test_create_checkout.py'
--- a/bzrlib/tests/per_branch/test_create_checkout.py	2011-05-13 12:51:05 +0000
+++ b/bzrlib/tests/per_branch/test_create_checkout.py	2011-08-27 00:00:54 +0000
@@ -16,9 +16,6 @@
 
 """Tests for the Branch.create_checkout"""
 
-from bzrlib import (
-    branch,
-    )
 from bzrlib.tests import per_branch
 
 

=== modified file 'bzrlib/tests/per_branch/test_tags.py'
--- a/bzrlib/tests/per_branch/test_tags.py	2010-11-18 00:43:57 +0000
+++ b/bzrlib/tests/per_branch/test_tags.py	2011-08-26 23:59:59 +0000
@@ -22,9 +22,7 @@
 
 from bzrlib import (
     branch,
-    bzrdir,
     errors,
-    repository,
     tests,
     )
 from bzrlib.tests import per_branch

=== modified file 'bzrlib/tests/per_repository/test_repository.py'
--- a/bzrlib/tests/per_repository/test_repository.py	2011-08-19 22:34:02 +0000
+++ b/bzrlib/tests/per_repository/test_repository.py	2011-08-27 00:00:23 +0000
@@ -347,7 +347,7 @@
             return
         try:
             made_repo.set_make_working_trees(False)
-        except NotImplementedError:
+        except errors.UnsupportedOperation:
             # the repository does not support having its tree-making flag
             # toggled.
             return
@@ -811,7 +811,7 @@
         repo = self.make_repository('repo')
         try:
             repo.set_make_working_trees(True)
-        except errors.RepositoryUpgradeRequired, e:
+        except (errors.RepositoryUpgradeRequired, errors.UnsupportedOperation), e:
             raise tests.TestNotApplicable('Format does not support this flag.')
         self.assertTrue(repo.make_working_trees())
 
@@ -819,7 +819,7 @@
         repo = self.make_repository('repo')
         try:
             repo.set_make_working_trees(False)
-        except errors.RepositoryUpgradeRequired, e:
+        except (errors.RepositoryUpgradeRequired, errors.UnsupportedOperation), e:
             raise tests.TestNotApplicable('Format does not support this flag.')
         self.assertFalse(repo.make_working_trees())
 




More information about the bazaar-commits mailing list