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'👍'])
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'👍']])
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'👍']])
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'👍'] ])
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'👍'] ])