def testAsDict(self): conf.Load(station_id='station_id') self.assertEquals({ 'station_id': 'station_id', 'string_default': 'default', 'none_default': None, 'flag_key': 'flag_value', 'other_flag': 'other_value', }, conf._asdict())
def testAsDict(self): conf.Load(station_id='station_id') self.assertEquals( { 'station_id': 'station_id', 'string_default': 'default', 'none_default': None, 'flag_key': 'flag_value', 'other_flag': 'other_value', }, conf._asdict())
def __init__(self, *phases, **metadata): code_info = test_record.CodeInfo.ForModuleFromStack(levels_up=2) self._test_options = TestOptions() self._test_data = TestData(phases, metadata=metadata, code_info=code_info) self._test_data.metadata['config'] = conf._asdict() self._lock = threading.Lock() self._executor = None # Make sure Configure() gets called at least once before Execute(). The # user might call Configure() again to override options, but we don't want # to force them to if they want to use defaults. For default values, see # the class definition of TestOptions. self.Configure() # TODO(madsci): Fix this to play nice with multiple Test instances. signal.signal(signal.SIGINT, self.StopFromSigInt)