131 testui(user='abc', group='def', cuser=None) |
131 testui(user='abc', group='def', cuser=None) |
132 |
132 |
133 print "# prints debug warnings" |
133 print "# prints debug warnings" |
134 u = testui(user='abc', group='def', cuser='foo', debug=True) |
134 u = testui(user='abc', group='def', cuser='foo', debug=True) |
135 |
135 |
136 print "# ui.readsections" |
136 print "# ui.readconfig sections" |
137 filename = 'foobar' |
137 filename = 'foobar' |
138 f = open(filename, 'w') |
138 f = open(filename, 'w') |
139 f.write('[foobar]\n') |
139 f.write('[foobar]\n') |
140 f.write('baz = quux\n') |
140 f.write('baz = quux\n') |
141 f.close() |
141 f.close() |
142 u.readsections(filename, 'foobar') |
142 u.readconfig(filename, sections = ['foobar']) |
143 print u.config('foobar', 'baz') |
143 print u.config('foobar', 'baz') |
144 |
144 |
145 print |
145 print |
146 print "# read trusted, untrusted, new ui, trusted" |
146 print "# read trusted, untrusted, new ui, trusted" |
147 u = ui.ui() |
147 u = ui.ui() |