interrupting builds by writing to a temporary file and renaming,
not writing the file directly.
+ From Elliot Murphy:
+
+ - Enhance the tests to guarantee persistence of ListOption
+ values in saved options files.
+
From Gary Oberbrunner:
- Add an Environment.Dump() method to print the contents of a
l = o.converter('all')
n = l.__class__(copy.copy(l))
+ def test___repr__(self):
+ """Test copying a ListOption like an Environment would"""
+
if __name__ == "__main__":
suite = unittest.makeSuite(ListOptionTestCase, 'test_')
if not unittest.TextTestRunner().run(suite).wasSuccessful():
opts.Add('UNSPECIFIED',
'An option with no value')
+opts.Add('LISTOPTION_TEST',
+ 'testing list option persistence',
+ 'none',
+ names = ['a','b','c',])
+
env = Environment(options = opts)
print env['RELEASE_BUILD']
print env['DEBUG_BUILD']
+print env['LISTOPTION_TEST']
opts.Save('options.saved', env)
""")
checkSave('options.saved', {})
# Now specify same option non-default and make sure only it is written out
-test.run(arguments='"DEBUG_BUILD=0"')
+test.run(arguments='"DEBUG_BUILD=0" "LISTOPTION_TEST=a,b"')
check(['0','0'])
-checkSave('options.saved',{'DEBUG_BUILD':0})
+checkSave('options.saved',{'DEBUG_BUILD':0, 'LISTOPTION_TEST':'a,b'})
test.write('SConstruct', """
opts = Options('custom.py')