/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/test_selftest.py

  • Committer: v.ladeuil+lp at free
  • Date: 2007-01-11 08:45:51 UTC
  • mto: (2229.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2230.
  • Revision ID: v.ladeuil+lp@free.fr-20070111084551-i00dpvj4161h421n
Cleanup.

* bzrlib/tests/test_selftest.py:
(TestTestCaseWithMemoryTransport.test_make_branch_and_memory_tree,
TestTestCaseWithMemoryTransport.test_make_branch_and_memory_tree_with_format):
Inline previous calls to fail[Unless|If]ExistsOnDisk and clearly
explain their aim.

* bzrlib/tests/__init__.py:
(TestCaseWithMemoryTransport.failUnlessExistsOnDisk,
TestCaseWithMemoryTransport.failIfExistsOnDisk): Deleted. They
were more confusing than helpful.
        

Show diffs side-by-side

added added

removed removed

Lines of Context:
467
467
        a branch and checking no directory was created at its relpath.
468
468
        """
469
469
        tree = self.make_branch_and_memory_tree('dir')
470
 
        self.failIfExistsOnDisk('dir')
 
470
        # Guard against regression into MemoryTransport leaking
 
471
        # files to disk instead of keeping them in memory.
 
472
        self.failIf(osutils.lexists('dir'))
471
473
        self.assertIsInstance(tree, memorytree.MemoryTree)
472
474
 
473
475
    def test_make_branch_and_memory_tree_with_format(self):
475
477
        format = bzrdir.BzrDirMetaFormat1()
476
478
        format.repository_format = repository.RepositoryFormat7()
477
479
        tree = self.make_branch_and_memory_tree('dir', format=format)
478
 
        self.failIfExistsOnDisk('dir')
 
480
        # Guard against regression into MemoryTransport leaking
 
481
        # files to disk instead of keeping them in memory.
 
482
        self.failIf(osutils.lexists('dir'))
479
483
        self.assertIsInstance(tree, memorytree.MemoryTree)
480
484
        self.assertEqual(format.repository_format.__class__,
481
485
            tree.branch.repository._format.__class__)