Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
    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
Exemple #4
0
    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
Exemple #5
0
 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
Exemple #6
0
 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