~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Martin Pool
  • Date: 2008-10-27 08:02:47 UTC
  • mfrom: (3795 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3798.
  • Revision ID: mbp@sourcefrog.net-20081027080247-0al6nrx2v8u1dcci
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
    def supports_rich_root(self):
479
479
        return False
480
480
 
 
481
    def get_graph(self):
 
482
        raise NotImplementedError
 
483
 
 
484
    def get_parent_map(self, revision_ids):
 
485
        raise NotImplementedError
 
486
 
481
487
 
482
488
class InterDummy(repository.InterRepository):
483
489
    """An inter-repository optimised code path for DummyRepository.
998
1004
    # thus there are not yet any tests.
999
1005
 
1000
1006
 
 
1007
class TestOptimisingPacker(TestCaseWithTransport):
 
1008
    """Tests for the OptimisingPacker class."""
 
1009
 
 
1010
    def get_pack_collection(self):
 
1011
        repo = self.make_repository('.')
 
1012
        return repo._pack_collection
 
1013
 
 
1014
    def test_open_pack_will_optimise(self):
 
1015
        packer = pack_repo.OptimisingPacker(self.get_pack_collection(),
 
1016
                                            [], '.test')
 
1017
        new_pack = packer.open_pack()
 
1018
        self.assertIsInstance(new_pack, pack_repo.NewPack)
 
1019
        self.assertTrue(new_pack.revision_index._optimize_for_size)
 
1020
        self.assertTrue(new_pack.inventory_index._optimize_for_size)
 
1021
        self.assertTrue(new_pack.text_index._optimize_for_size)
 
1022
        self.assertTrue(new_pack.signature_index._optimize_for_size)
 
1023
 
 
1024
 
1001
1025
class TestInterDifferingSerializer(TestCaseWithTransport):
1002
1026
 
1003
1027
    def test_progress_bar(self):