~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

Merge from integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
        return self._signatures
130
130
 
131
131
 
 
132
bool_config = """[DEFAULT]
 
133
active = true
 
134
inactive = false
 
135
[UPPERCASE]
 
136
active = True
 
137
nonactive = False
 
138
"""
 
139
class TestConfigObj(TestCase):
 
140
    def test_get_bool(self):
 
141
        from bzrlib.config import ConfigObj
 
142
        co = ConfigObj(StringIO(bool_config))
 
143
        self.assertIs(co.get_bool('DEFAULT', 'active'), True)
 
144
        self.assertIs(co.get_bool('DEFAULT', 'inactive'), False)
 
145
        self.assertIs(co.get_bool('UPPERCASE', 'active'), True)
 
146
        self.assertIs(co.get_bool('UPPERCASE', 'nonactive'), False)
 
147
 
 
148
 
132
149
class TestConfig(TestCase):
133
150
 
134
151
    def test_constructs(self):