def test_format_default(): """Test formatting of config variable defaults """ man = ConfigManager() man.add_variable('test:var', 'bool', 'test variable', 'false') desc = man.describe('test:var') assert desc == 'test:var (bool): test variable [default: false]'
def test_format_nodefault(): """Test formatting of config variable without a default value """ man = ConfigManager() man.add_variable('test:var', 'bool', 'test variable') desc = man.describe('test:var') assert desc == 'test:var (bool): test variable [no default]'