~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Patch Queue Manager
  • Date: 2011-12-30 15:51:59 UTC
  • mfrom: (6213.1.63 update-feature-flags)
  • Revision ID: pqm@pqm.ubuntu.com-20111230155159-qrgafyvytuitiq8u
(jelmer) Add {Repository, Branch, WorkingTree,
 BzrDir}.update_feature_flags methods. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
 
220
220
    def test_find_format_with_features(self):
221
221
        tree = self.make_branch_and_tree('.', format='2a')
222
 
        tree.branch.control_transport.put_bytes('format',
223
 
            tree.branch._format.get_format_string() +
224
 
            "optional name\n")
 
222
        tree.branch.update_feature_flags({"name": "optional"})
225
223
        found_format = _mod_branch.BranchFormatMetadir.find_format(tree.bzrdir)
226
224
        self.assertIsInstance(found_format, _mod_branch.BranchFormatMetadir)
227
225
        self.assertEquals(found_format.features.get("name"), "optional")
 
226
        tree.branch.update_feature_flags({"name": None})
 
227
        branch = _mod_branch.Branch.open('.')
 
228
        self.assertEquals(branch._format.features, {})
228
229
 
229
230
    def test_register_unregister_format(self):
230
231
        # Test the deprecated format registration functions