Exemplo n.º 1
0
    def test_exclude_with_row_names(self):
        table = Table(self.rows,
                      self.column_names,
                      self.column_types,
                      row_names='three')
        new_table = table.exclude(('one', 'two'))

        self.assertRowNames(new_table, ['a', 'b', u'👍'])
Exemplo n.º 2
0
    def test_exclude_single(self):
        table = Table(self.rows, self.column_names, self.column_types)

        new_table = table.exclude('one')

        self.assertIsNot(new_table, table)

        self.assertColumnNames(new_table, ['two', 'three'])
        self.assertColumnTypes(new_table, [Number, Text])
        self.assertRows(new_table, [[4, 'a'], [3, 'b'], [2, u'👍']])
Exemplo n.º 3
0
    def test_exclude(self):
        table = Table(self.rows, self.column_names, self.column_types)

        new_table = table.exclude(('one', 'two'))

        self.assertIsNot(new_table, table)

        self.assertColumnNames(new_table, ['three'])
        self.assertColumnTypes(new_table, [Text])
        self.assertRows(new_table, [['a'], ['b'], [u'👍']])
Exemplo n.º 4
0
    def test_exclude_single(self):
        table = Table(self.rows, self.column_names, self.column_types)

        new_table = table.exclude('one')

        self.assertIsNot(new_table, table)

        self.assertColumnNames(new_table, ['two', 'three'])
        self.assertColumnTypes(new_table, [Number, Text])
        self.assertRows(new_table, [
            [4, 'a'],
            [3, 'b'],
            [2, u'👍']
        ])
Exemplo n.º 5
0
    def test_exclude(self):
        table = Table(self.rows, self.column_names, self.column_types)

        new_table = table.exclude(('one', 'two'))

        self.assertIsNot(new_table, table)

        self.assertColumnNames(new_table, ['three'])
        self.assertColumnTypes(new_table, [Text])
        self.assertRows(new_table, [
            ['a'],
            ['b'],
            [u'👍']
        ])
Exemplo n.º 6
0
    def test_exclude_with_row_names(self):
        table = Table(self.rows, self.column_names, self.column_types, row_names='three')
        new_table = table.exclude(('one', 'two'))

        self.assertRowNames(new_table, ['a', 'b', u'👍'])