~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Robert Collins
  • Date: 2006-04-18 22:41:16 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1671.
  • Revision ID: robertc@robertcollins.net-20060418224116-9b723440fa56e404
 * 'Metadir' is now the default disk format. This improves behaviour in
   SFTP using circumstances and allows binding and rebinding and easier
   use of repositories. (Robert Collins, Aaron Bentley).

Show diffs side-by-side

added added

removed removed

Lines of Context:
375
375
        self.assertRaises(AssertionError, self.assertIsDirectory, 'a_file', t)
376
376
        self.assertRaises(AssertionError, self.assertIsDirectory, 'not_here', t)
377
377
 
 
378
 
378
379
class TestChrootedTest(ChrootedTestCase):
379
380
 
380
381
    def test_root_is_root(self):
392
393
        self.assertIsInstance(u'', basestring)
393
394
        self.assertRaises(AssertionError, self.assertIsInstance, None, int)
394
395
        self.assertRaises(AssertionError, self.assertIsInstance, 23.3, int)
 
396
 
 
397
 
 
398
class TestConvenienceMakers(TestCaseWithTransport):
 
399
    """Test for the make_* convenience functions."""
 
400
 
 
401
    def test_make_branch_and_tree_with_format(self):
 
402
        # we should be able to supply a format to make_branch_and_tree
 
403
        self.make_branch_and_tree('a', format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
404
        self.make_branch_and_tree('b', format=bzrlib.bzrdir.BzrDirFormat6())
 
405
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('a')._format,
 
406
                              bzrlib.bzrdir.BzrDirMetaFormat1)
 
407
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('b')._format,
 
408
                              bzrlib.bzrdir.BzrDirFormat6)
 
409