~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-19 08:31:08 UTC
  • mfrom: (1666.1.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060419083108-fab2970f4575b010
Change the default branch format to be metadir. (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