@@ -16,11 +16,11 @@ def test_check_exact_identical_columns_and_rows():
1616 })
1717
1818 # Exact duplicates - should identify and remove B
19- result_df = check_identical_columns_and_rows (df1 , "Test DataFrame 1" , remove = True )
19+ result_df = check_identical_columns_and_rows (df1 , remove = True )
2020 assert list (result_df .columns ) == ["A" , "C" ], "Failed to remove duplicate columns accurately"
2121
2222 # No duplicates - should not remove any columns
23- result_df = check_identical_columns_and_rows (df2 , "Test DataFrame 2" , remove = True )
23+ result_df = check_identical_columns_and_rows (df2 , remove = True )
2424 assert list (result_df .columns ) == ["X" , "Y" ], "Incorrectly removed columns when there were none to remove"
2525
2626def test_check_identical_columns_and_rows_with_tol ():
@@ -32,11 +32,11 @@ def test_check_identical_columns_and_rows_with_tol():
3232 })
3333
3434 # Within-tolerance duplicates - should identify and remove B
35- result_df = check_identical_columns_and_rows_with_tol (df1 , "Test DataFrame 1" , tolerance = 0.05 , remove = True )
35+ result_df = check_identical_columns_and_rows_with_tol (df1 , tolerance = 0.05 , remove = True )
3636 assert list (result_df .columns ) == ["A" , "C" ], "Failed to remove near-duplicate columns accurately"
3737
3838 # No near duplicates within a small tolerance
39- result_df = check_identical_columns_and_rows_with_tol (df1 , "Test DataFrame 1" , tolerance = 0.001 , remove = True )
39+ result_df = check_identical_columns_and_rows_with_tol (df1 , tolerance = 0.001 , remove = True )
4040 assert list (result_df .columns ) == ["A" , "B" , "C" ], "Incorrectly removed columns when they are not near duplicates"
4141
4242def test_check_exact_identical_columns_and_rows_remove_true ():
@@ -46,7 +46,7 @@ def test_check_exact_identical_columns_and_rows_remove_true():
4646 "C" : [4 , 5 , 6 ]
4747 })
4848
49- result_df = check_identical_columns_and_rows (df1 , "Test DataFrame 1" , remove = True )
49+ result_df = check_identical_columns_and_rows (df1 , remove = True )
5050 assert list (result_df .columns ) == ["A" , "C" ], "Failed to remove duplicate columns accurately"
5151
5252def test_check_exact_identical_columns_and_rows_remove_false ():
@@ -57,7 +57,7 @@ def test_check_exact_identical_columns_and_rows_remove_false():
5757 })
5858
5959 # Check without removing duplicates
60- result_df = check_identical_columns_and_rows (df1 , "Test DataFrame 1" , remove = False )
60+ result_df = check_identical_columns_and_rows (df1 , remove = False )
6161 assert list (result_df .columns ) == ["A" , "B" , "C" ], "Incorrectly identified or removed columns when remove=False"
6262
6363def test_check_identical_columns_and_rows_with_tol_remove_true ():
@@ -67,7 +67,7 @@ def test_check_identical_columns_and_rows_with_tol_remove_true():
6767 "C" : [4.00 , 5.00 , 6.00 ]
6868 })
6969
70- result_df = check_identical_columns_and_rows_with_tol (df1 , "Test DataFrame 1" , tolerance = 0.05 , remove = True )
70+ result_df = check_identical_columns_and_rows_with_tol (df1 , tolerance = 0.05 , remove = True )
7171 assert list (result_df .columns ) == ["A" , "C" ], "Failed to remove near-duplicate columns accurately with tolerance"
7272
7373def test_check_identical_columns_and_rows_with_tol_remove_false ():
@@ -78,7 +78,7 @@ def test_check_identical_columns_and_rows_with_tol_remove_false():
7878 })
7979
8080 # Check without removing duplicates
81- result_df = check_identical_columns_and_rows_with_tol (df1 , "Test DataFrame 1" , tolerance = 0.05 , remove = False )
81+ result_df = check_identical_columns_and_rows_with_tol (df1 , tolerance = 0.05 , remove = False )
8282 assert list (result_df .columns ) == ["A" , "B" , "C" ], "Incorrectly identified or removed columns when remove=False"
8383
8484def test_with_no_duplicates ():
@@ -87,10 +87,10 @@ def test_with_no_duplicates():
8787 "Y" : [4 , 5 , 6 ],
8888 "Z" : [7 , 8 , 9 ]
8989 })
90- result_df = check_identical_columns_and_rows (df , "Test DataFrame with No Duplicates" , remove = True )
90+ result_df = check_identical_columns_and_rows (df , remove = True )
9191 assert list (result_df .columns ) == ["X" , "Y" , "Z" ], "Incorrectly removed columns in a no-duplicates scenario"
9292
93- result_df_with_tol = check_identical_columns_and_rows_with_tol (df , "Test DataFrame with No Duplicates" , tolerance = 0.1 , remove = True )
93+ result_df_with_tol = check_identical_columns_and_rows_with_tol (df , tolerance = 0.1 , remove = True )
9494 assert list (result_df_with_tol .columns ) == ["X" , "Y" , "Z" ], "Incorrectly removed columns in a no-duplicates scenario with tolerance"
9595
9696
0 commit comments