166
186
# register a format for it.
167
187
workingtree.WorkingTreeFormat.register_format(format)
168
189
# which branch.Open will refuse (not supported)
169
190
self.assertRaises(errors.UnsupportedFormatError, workingtree.WorkingTree.open, '.')
170
191
# but open_downlevel will work
171
192
self.assertEqual(format.open(dir), workingtree.WorkingTree.open_downlevel('.'))
173
194
workingtree.WorkingTreeFormat.unregister_format(format)
176
205
class TestWorkingTreeFormat3(TestCaseWithTransport):