~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-16 23:16:52 UTC
  • mfrom: (4606.1.1 bug-389141)
  • Revision ID: pqm@pqm.ubuntu.com-20090816231652-3v3cyyio0ibr7odn
(robertc) Change a KnownFailure into a test with two success paths in
        preperation for 2a as default. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1008
1008
        """
1009
1009
        broken_repo = self.make_broken_repository()
1010
1010
        empty_repo = self.make_repository('empty-repo')
1011
 
        # See bug https://bugs.launchpad.net/bzr/+bug/389141 for information
1012
 
        # about why this was turned into expectFailure
1013
 
        self.expectFailure('new Stream fetch fills in missing compression'
1014
 
           ' parents (bug #389141)',
1015
 
           self.assertRaises, (errors.RevisionNotPresent, errors.BzrCheckError),
1016
 
                              empty_repo.fetch, broken_repo)
1017
 
        self.assertRaises((errors.RevisionNotPresent, errors.BzrCheckError),
1018
 
                          empty_repo.fetch, broken_repo)
 
1011
        try:
 
1012
            empty_repo.fetch(broken_repo)
 
1013
        except (errors.RevisionNotPresent, errors.BzrCheckError):
 
1014
            # Test successful: compression parent not being copied leads to
 
1015
            # error.
 
1016
            return
 
1017
        empty_repo.lock_read()
 
1018
        self.addCleanup(empty_repo.unlock)
 
1019
        text = empty_repo.texts.get_record_stream(
 
1020
            [('file2-id', 'rev3')], 'topological', True).next()
 
1021
        self.assertEqual('line\n', text.get_bytes_as('fulltext'))
1019
1022
 
1020
1023
 
1021
1024
class TestRepositoryPackCollection(TestCaseWithTransport):