/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/branch_implementations/test_branch.py

  • Committer: Martin Pool
  • Date: 2006-06-06 08:09:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1799.
  • Revision ID: mbp@sourcefrog.net-20060606080909-f7c9ea6defe2e751
Remove Scratch objects used by doctests

Some old doctests rely on special Scratch object which clean up
temporary directory when they're deleted.  This is a bit undesirable
because deletion is not predictable and the classes aren't used enough
to be worthwhile.

 * Remove ScratchBranch, ScratchDir, ScratchTransport, etc
 * Remove old doctests or convert to unittests
 * Incidental cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
341
341
        branch, relpath = Branch.open_containing(self.get_readonly_url('g/p/q'))
342
342
        self.assertEqual('g/p/q', relpath)
343
343
        
344
 
# TODO: rewrite this as a regular unittest, without relying on the displayed output        
345
 
#         >>> from bzrlib.commit import commit
346
 
#         >>> bzrlib.trace.silent = True
347
 
#         >>> br1 = ScratchBranch(files=['foo', 'bar'])
348
 
#         >>> br1.working_tree().add('foo')
349
 
#         >>> br1.working_tree().add('bar')
350
 
#         >>> commit(br1, "lala!", rev_id="REVISION-ID-1", verbose=False)
351
 
#         >>> br2 = ScratchBranch()
352
 
#         >>> br2.update_revisions(br1)
353
 
#         Added 2 texts.
354
 
#         Added 1 inventories.
355
 
#         Added 1 revisions.
356
 
#         >>> br2.revision_history()
357
 
#         [u'REVISION-ID-1']
358
 
#         >>> br2.update_revisions(br1)
359
 
#         Added 0 revisions.
360
 
#         >>> br1.text_store.total_size() == br2.text_store.total_size()
361
 
#         True
362
344
 
363
345
class InstrumentedTransaction(object):
364
346