def test_csv_excel_equal(self): csv_path = 'fish-5.csv' df1 = parse_csv(datafile(csv_path)) excel_path = 'fish-5.xlsx' df2 = parse_excel(datafile(excel_path)) pd.testing.assert_frame_equal(df1, df2)
def test_read_csv_file_missing_col(self): path = 'missing-col.csv' self.assertRaises(EmptyDataError, parse_csv(datafile(path)))
def test_read_csv_file_without_suffix(self): path = 'fish-5' df = parse_csv(datafile(path)) self.assertEqual(len(df.index), 50)
def test_read_csv_file_empty(self): path = 'empty.csv' self.assertRaises(EmptyDataError, parse_csv(datafile(path)))
def test_read_csv_file(self): path = 'fish-5.csv' df = parse_csv(datafile(path)) self.assertEqual(len(df.index), 50)