Rev 4607: Change test_insert_from_broken_repo from a known failure to a working test. in http://bazaar.launchpad.net/~lifeless/bzr/bug-389141
Robert Collins
robertc at robertcollins.net
Fri Aug 14 05:11:47 BST 2009
At http://bazaar.launchpad.net/~lifeless/bzr/bug-389141
------------------------------------------------------------
revno: 4607
revision-id: robertc at robertcollins.net-20090814041142-qvp473zy7vcxa7nl
parent: pqm at pqm.ubuntu.com-20090814002017-l0qxa8jj76sige97
committer: Robert Collins <robertc at robertcollins.net>
branch nick: bug-389141
timestamp: Fri 2009-08-14 14:11:42 +1000
message:
Change test_insert_from_broken_repo from a known failure to a working test.
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2009-06-29 15:07:51 +0000
+++ b/bzrlib/tests/test_repository.py 2009-08-14 04:11:42 +0000
@@ -1008,14 +1008,17 @@
"""
broken_repo = self.make_broken_repository()
empty_repo = self.make_repository('empty-repo')
- # See bug https://bugs.launchpad.net/bzr/+bug/389141 for information
- # about why this was turned into expectFailure
- self.expectFailure('new Stream fetch fills in missing compression'
- ' parents (bug #389141)',
- self.assertRaises, (errors.RevisionNotPresent, errors.BzrCheckError),
- empty_repo.fetch, broken_repo)
- self.assertRaises((errors.RevisionNotPresent, errors.BzrCheckError),
- empty_repo.fetch, broken_repo)
+ try:
+ empty_repo.fetch(broken_repo)
+ except (errors.RevisionNotPresent, errors.BzrCheckError):
+ # Test successful: compression parent not being copied leads to
+ # error.
+ return
+ empty_repo.lock_read()
+ self.addCleanup(empty_repo.unlock)
+ text = empty_repo.texts.get_record_stream(
+ [('file2-id', 'rev3')], 'topological', True).next()
+ self.assertEqual('line\n', text.get_bytes_as('fulltext'))
class TestRepositoryPackCollection(TestCaseWithTransport):
More information about the bazaar-commits
mailing list