def test_duplicate_column2(): testing_df = df.copy() with pytest.raises(Exception): clean.insertDuplicateColumn(testing_df, 6)
def test_duplicate_column1(): testing_df = df.copy() result_df = df.copy() clean.insertDuplicateColumn(testing_df, 0) result_df.insert(1, 'col1_copy', result_df['col1'], allow_duplicates=True) assert (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True