~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Aaron Bentley
  • Date: 2008-01-11 17:59:20 UTC
  • mto: This revision was merged to the branch mainline in revision 3177.
  • Revision ID: abentley@panoramicfeedback.com-20080111175920-dn202iylc1kfdfif
Reconfigure can safely be interrupted while fetching (#179316)

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        self.assertRaises(errors.NoRepositoryPresent,
201
201
                          child.bzrdir.open_repository)
202
202
 
 
203
    def test_branch_to_lightweight_checkout_failure(self):
 
204
        parent = self.make_branch('parent')
 
205
        child = parent.bzrdir.sprout('child').open_workingtree()
 
206
        child.commit('test', rev_id='new-commit')
 
207
        reconfiguration = reconfigure.Reconfigure.to_lightweight_checkout(
 
208
            child.bzrdir)
 
209
        old_Repository_fetch = repository.Repository.fetch
 
210
        repository.Repository.fetch = None
 
211
        try:
 
212
            self.assertRaises(TypeError, reconfiguration.apply)
 
213
        finally:
 
214
            repository.Repository.fetch = old_Repository_fetch
 
215
        child = _mod_branch.Branch.open('child')
 
216
        self.assertContainsRe(child.base, 'child/$')
 
217
 
203
218
    def test_lightweight_checkout_to_lightweight_checkout(self):
204
219
        parent = self.make_branch('parent')
205
220
        checkout = parent.create_checkout('checkout', lightweight=True)