def test_drop_column(simple_int_csv): processor = CSVProcessor(simple_int_csv, types=[int, int, int]) processor.drop_column(2) assert processor.csv == [[1, 8], [4, 5], [0, 5]] assert processor.header == ['col1', 'col2']
def test_drop_column_multiple_types(multiple_types_csv): processor = CSVProcessor(multiple_types_csv, types=(int, str, float)) processor.drop_column(2) assert processor.csv == [[0, "'str3'"], [1, "'str2'"], [2, "'str1'"]]
def test_drop_column_multi(multiple_types_csv): processor = CSVProcessor(multiple_types_csv, types=[int, str, float]) processor.drop_column(2) assert processor.csv == [[0, "'str3'"], [1, "'str2'"], [2, "'str1'"]] assert processor.header == ['col1', 'col2']
def test_drop_column(simple_int_csv): processor = CSVProcessor(simple_int_csv, types=(int, int, int)) processor.drop_column(2) assert processor.csv == [[1, 8], [4, 5], [0, 5]]