def test_list_variable_item_info_when_value_none(self): name = '@{foo}' source = 'source' value = None info = VariableInfo(name, value, source) assert_equals(info.name, name) assert_in_details(info, source, '')
def test_list_variable_item_info(self): name = '@{foo}' source = 'source' value = variablefetcher._format_value([1, 2, 3]) info = VariableInfo(name, value, source) assert_equals(info.name, name) assert_in_details(info, source, '[ 1 | 2 | 3 ]')
def test_variable_item_info(self): name = '${foo}' source = 'source' value = True info = VariableInfo(name, value, source) assert_equals(info.name, name) assert_in_details(info, source, 'True')
def __iter__(self): for name, value in self._vars.items(): source = self._sources[name] if source == self.ARGUMENT_SOURCE: yield ArgumentInfo(name, value) else: yield VariableInfo(name, value, source)
def __iter__(self): for name, value in self._vars.store.data.items(): source = self._sources[name] prefix = self._get_prefix(value) name = u'{0}{{{1}}}'.format(prefix, name) if source == self.ARGUMENT_SOURCE: yield ArgumentInfo(name, value) else: yield VariableInfo(name, value, source)