510
510
self.config.get_user_option('append_revisions_only'))
511
511
self.check_aro_is(False)
512
512
self.check_aro_is(False, 'False')
513
self.check_aro_is(False, 'false')
514
513
self.check_aro_is(True, 'True')
515
self.check_aro_is(True, 'true')
517
515
def test_invalid_append_revisions_only(self):
518
"""Ensure that BzrOptionValue raised on invalid settings"""
516
"""Ensure warning is noted on invalid settings"""
519
517
self.config.set_user_option('append_revisions_only', 'invalid')
521
519
def warning(*args):
522
520
warnings.append(args[0] % args[1:])
523
521
self.overrideAttr(trace, 'warning', warning)
522
self.check_aro_is(True, 'false')
524
'Value "false" for append_revisions_only is neither True'
525
' nor False, defaulting to True',
529
self.check_aro_is(True, 'true')
531
'Value "true" for append_revisions_only is neither True'
532
' nor False, defaulting to True',
524
536
self.check_aro_is(True, 'not-a-bool')
525
537
self.assertEqual(
526
'Value "not-a-bool" for append_revisions_only is not a boolean,'
527
' defaulting to True',
538
'Value "not-a-bool" for append_revisions_only is neither True'
539
' nor False, defaulting to True',