def test_adjoin(): data = [['a', 'b', 'c'], ['dd', 'ee', 'ff'], ['ggg', 'hhh', 'iii']] expected = 'a dd ggg\nb ee hhh\nc ff iii' adjoined = pytools.adjoin(2, *data) assert (adjoined == expected)
def test_adjoin(): data = [['a', 'b', 'c'], ['dd', 'ee', 'ff'], ['ggg', 'hhh', 'iii']] expected = 'a dd ggg\nb ee hhh\nc ff iii' adjoined = pytools.adjoin(2, *data) assert(adjoined == expected)
def __repr__(self): output = str(self.__class__) + '\n' keys = [] values = [] for k, v in sorted(self.handle.root._v_children.iteritems()): kind = v._v_attrs.pandas_type keys.append(str(k)) values.append(kind) output += adjoin(5, keys, values) return output
def __repr__(self): output = str(self.__class__) + '\n' keys, values = zip(*self._classes.iteritems()) output += adjoin(5, map(str, keys), map(str, values)) return output