[MERGE][#365865] Implement RemoteBranch.set_append_revisions_only.

Martin Pool mbp at canonical.com
Fri Apr 24 13:50:25 BST 2009


Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
That looks good.

+    def 
test_remote_branch_set_append_revisions_only_upgrade_reqd(self):
+        raise KnownFailure(
+            'RemoteBranch.set_append_revisions_only never '
+            'raises UpgradeRequired.')
+        branch = self.make_branch('branch', format='knit')
+        config = branch.get_config()
+        branch.set_append_revisions_only(True)
+        self.assertRaises(
+            errors.UpgradeRequired,
+            config.get_user_option, 'append_revisions_only')

This is a somewhat quirky use of KnownFailure.  It's better if it's only 
raised if the thing actually fails, so that the code needs to be updated 
if it's fixed.

So, I would: remove the assertRaises and just try to call it, and then 
raise KnownFailure if no exception is raised, and let the 
UpgradeRequired fail the test if it is raised.

For details, see: 
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C20090424063000.GA29688%40steerpike.home.puzzling.org%3E
Project: Bazaar



More information about the bazaar mailing list