Home | Trees | Indices | Help |
|
---|
|
1 import unittest 2 import tempfile 3 from starcluster.config import StarClusterConfig 4 from starcluster.tests.templates.config import config_test_template, default_config7 8 __cfg = None 9 10 @property3012 """ Returns (valid) default test config """ 13 if not self.__cfg: 14 tmp_file = tempfile.NamedTemporaryFile() 15 tmp_file.write(config_test_template % default_config) 16 tmp_file.flush() 17 self.__cfg = StarClusterConfig(tmp_file.name, cache=True); self.__cfg.load() 18 return self.__cfg1921 """ Returns default test config modified by kwargs """ 22 tmp_file = tempfile.NamedTemporaryFile() 23 kwords = {}; 24 kwords.update(default_config) 25 kwords.update(kwargs) 26 tmp_file.write(config_test_template % kwords); 27 tmp_file.flush() 28 cfg = StarClusterConfig(tmp_file.name, cache=True); cfg.load() 29 return cfg
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri May 14 13:53:41 2010 | http://epydoc.sourceforge.net |