/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-02-20 01:40:08 UTC
  • mfrom: (3221.3.5 repository-stackable-flag)
  • Revision ID: pqm@pqm.ubuntu.com-20080220014008-9appc9kw4rjg8v1k
Add external references support attribute to repository formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
        self.assertRaises(errors.OutSideTransaction,
177
177
            inv.add_lines, 'foo', [], [])
178
178
 
 
179
    def test_supports_external_lookups(self):
 
180
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
 
181
        repo = weaverepo.RepositoryFormat6().initialize(control)
 
182
        self.assertFalse(repo._format.supports_external_lookups)
 
183
 
179
184
 
180
185
class TestFormat7(TestCaseWithTransport):
181
186
    
289
294
        self.assertRaises(errors.OutSideTransaction,
290
295
            inv.add_lines, 'foo', [], [])
291
296
 
 
297
    def test_supports_external_lookups(self):
 
298
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
 
299
        repo = weaverepo.RepositoryFormat7().initialize(control)
 
300
        self.assertFalse(repo._format.supports_external_lookups)
 
301
 
292
302
 
293
303
class TestFormatKnit1(TestCaseWithTransport):
294
304
    
404
414
        inv = repo.deserialise_inventory('other-rev-id', inv_xml)
405
415
        self.assertEqual('other-rev-id', inv.root.revision)
406
416
 
 
417
    def test_supports_external_lookups(self):
 
418
        repo = self.make_repository('.',
 
419
                format=bzrdir.format_registry.get('knit')())
 
420
        self.assertFalse(repo._format.supports_external_lookups)
 
421
 
407
422
 
408
423
class KnitRepositoryStreamTests(test_knit.KnitTests):
409
424
    """Tests for knitrepo._get_stream_as_bytes."""
677
692
        self.assertRaises(errors.OutSideTransaction,
678
693
            inv.add_lines, 'foo', [], [])
679
694
 
 
695
    def test_supports_external_lookups(self):
 
696
        format = bzrdir.BzrDirMetaFormat1()
 
697
        format.repository_format = knitrepo.RepositoryFormatKnit3()
 
698
        repo = self.make_repository('.', format=format)
 
699
        self.assertFalse(repo._format.supports_external_lookups)
 
700
 
680
701
 
681
702
class TestWithBrokenRepo(TestCaseWithTransport):
682
703
    """These tests seem to be more appropriate as interface tests?"""
1171
1192
        self.assertRaises(errors.RevisionNotPresent,
1172
1193
            missing_ghost.get_inventory, 'ghost')
1173
1194
 
 
1195
    def test_supports_external_lookups(self):
 
1196
        repo = self.make_repository('.', format=self.get_format())
 
1197
        self.assertFalse(repo._format.supports_external_lookups)
 
1198
 
1174
1199
 
1175
1200
class TestKnitPackSubtrees(TestKnitPackNoSubtrees):
1176
1201