comparison martini/tests/test_config.txt @ 6:09bed87f7fa4

fix some errors
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 24 Nov 2010 10:49:37 -0800
parents 3c3522ce6e3a
children 7c8f23eae311
comparison
equal deleted inserted replaced
5:13d85b455533 6:09bed87f7fa4
88 >>> munger['foo']['baz'] 88 >>> munger['foo']['baz']
89 'fleem' 89 'fleem'
90 90
91 Move a secton around: 91 Move a secton around:
92 92
93 >>> munger.rename_section('foo', 'oof') 93 >>> munger.move_section('foo', 'oof')
94 >>> sorted(munger.sections()) 94 >>> sorted(munger.sections())
95 ['DEFAULTS', 'oof'] 95 ['DEFAULTS', 'oof']
96 >>> munger['oof'] 96 >>> munger['oof']
97 {'baz': 'fleem'} 97 {'baz': 'fleem'}
98 98
99 Test the ability to parse multi-line .ini files [TODO]: 99 Test the ability to parse multi-line .ini files:
100 100
101 >>> munger = ConfigMunger() 101 >>> munger = ConfigMunger()
102 >>> # munger.read("[Jeff Hammel]\naddress = 639 W. 173 St.\nApt. 11D\nNew York, NY 10032") 102 >>> munger.read("[Jeff Hammel]\naddress = 639 W. 173 St.\n Apt. 11D\n New York, NY 10032")
103 >>> munger.get('Jeff Hammel', 'address')
104 '639 W. 173 St.\nApt. 11D\nNew York, NY 10032'