# HG changeset patch # User Jeff Hammel # Date 1290624577 28800 # Node ID 09bed87f7fa44ecc4ee9b683cec6de7b4030a329 # Parent 13d85b4555333aacd9b739ae82fbe0e68a0e0198 fix some errors diff -r 13d85b455533 -r 09bed87f7fa4 martini/config.py --- a/martini/config.py Tue Mar 02 20:32:03 2010 -0500 +++ b/martini/config.py Wed Nov 24 10:49:37 2010 -0800 @@ -124,7 +124,7 @@ if sorted: options.sort() for option in options: - print >> fp, "%s = %s" % (option, self.get(section, option, raw, vars)) + print >> fp, "%s = %s" % (option, self.get(section, option, raw=raw, vars=vars)) if section != sections[-1]: print >> fp diff -r 13d85b455533 -r 09bed87f7fa4 martini/tests/test_config.txt --- a/martini/tests/test_config.txt Tue Mar 02 20:32:03 2010 -0500 +++ b/martini/tests/test_config.txt Wed Nov 24 10:49:37 2010 -0800 @@ -90,13 +90,15 @@ Move a secton around: - >>> munger.rename_section('foo', 'oof') + >>> munger.move_section('foo', 'oof') >>> sorted(munger.sections()) ['DEFAULTS', 'oof'] >>> munger['oof'] {'baz': 'fleem'} -Test the ability to parse multi-line .ini files [TODO]: +Test the ability to parse multi-line .ini files: >>> munger = ConfigMunger() - >>> # munger.read("[Jeff Hammel]\naddress = 639 W. 173 St.\nApt. 11D\nNew York, NY 10032") + >>> munger.read("[Jeff Hammel]\naddress = 639 W. 173 St.\n Apt. 11D\n New York, NY 10032") + >>> munger.get('Jeff Hammel', 'address') + '639 W. 173 St.\nApt. 11D\nNew York, NY 10032'