~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Robert Collins
  • Date: 2006-02-17 04:17:09 UTC
  • mto: (1534.1.24 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060217041709-7251eb701f69ca7e
Review feedback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
405
405
        dir = bzrdir.BzrDir.open(self.get_url())
406
406
        check_dir_components_use_same_lock(dir)
407
407
    
408
 
    def test_can_update(self):
409
 
        # format 5 dirs are updatable
 
408
    def test_can_convert(self):
 
409
        # format 5 dirs are convertable
410
410
        dir = bzrdir.BzrDirFormat5().initialize(self.get_url())
411
 
        self.assertTrue(dir.can_update_format())
 
411
        self.assertTrue(dir.can_convert_format())
412
412
    
413
 
    def test_needs_update(self):
414
 
        # format 5 dirs need an update if they are not the default.
 
413
    def test_needs_conversion(self):
 
414
        # format 5 dirs need a conversion if they are not the default.
415
415
        # and they start of not the default.
416
416
        old_format = bzrdir.BzrDirFormat.get_default_format()
417
417
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirFormat5())
418
418
        try:
419
419
            dir = bzrdir.BzrDirFormat5().initialize(self.get_url())
420
 
            self.assertFalse(dir.needs_format_update())
 
420
            self.assertFalse(dir.needs_format_conversion())
421
421
        finally:
422
422
            bzrdir.BzrDirFormat.set_default_format(old_format)
423
 
        self.assertTrue(dir.needs_format_update())
 
423
        self.assertTrue(dir.needs_format_conversion())
424
424
 
425
425
 
426
426
class TestFormat6(TestCaseWithTransport):
441
441
        dir = bzrdir.BzrDir.open(self.get_url())
442
442
        check_dir_components_use_same_lock(dir)
443
443
    
444
 
    def test_can_update(self):
445
 
        # format 6 dirs are updatable
 
444
    def test_can_convert(self):
 
445
        # format 6 dirs are convertable
446
446
        dir = bzrdir.BzrDirFormat6().initialize(self.get_url())
447
 
        self.assertTrue(dir.can_update_format())
 
447
        self.assertTrue(dir.can_convert_format())
448
448
    
449
 
    def test_needs_update(self):
450
 
        # format 6 dirs need an update if they are not the default.
 
449
    def test_needs_conversion(self):
 
450
        # format 6 dirs need an conversion if they are not the default.
451
451
        old_format = bzrdir.BzrDirFormat.get_default_format()
452
452
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirMetaFormat1())
453
453
        try:
454
454
            dir = bzrdir.BzrDirFormat6().initialize(self.get_url())
455
 
            self.assertTrue(dir.needs_format_update())
 
455
            self.assertTrue(dir.needs_format_conversion())
456
456
        finally:
457
457
            bzrdir.BzrDirFormat.set_default_format(old_format)
458
 
        self.assertFalse(dir.needs_format_update())
 
458
        self.assertFalse(dir.needs_format_conversion())