@@ -789,11 +789,11 @@ def test_validation(self):
789
789
merge (left , right_w_dups , left_index = True , right_index = True ,
790
790
validate = 'one_to_many' )
791
791
792
- with pytest .raises (ValueError ):
792
+ with pytest .raises (MergeError ):
793
793
merge (left , right_w_dups , left_index = True , right_index = True ,
794
794
validate = 'one_to_one' )
795
795
796
- with pytest .raises (ValueError ):
796
+ with pytest .raises (MergeError ):
797
797
merge (left , right_w_dups , on = 'a' , validate = 'one_to_one' )
798
798
799
799
# Dups on left
@@ -802,21 +802,21 @@ def test_validation(self):
802
802
merge (left_w_dups , right , left_index = True , right_index = True ,
803
803
validate = 'many_to_one' )
804
804
805
- with pytest .raises (ValueError ):
805
+ with pytest .raises (MergeError ):
806
806
merge (left_w_dups , right , left_index = True , right_index = True ,
807
807
validate = 'one_to_one' )
808
808
809
- with pytest .raises (ValueError ):
809
+ with pytest .raises (MergeError ):
810
810
merge (left_w_dups , right , on = 'a' , validate = 'one_to_one' )
811
811
812
812
# Dups on both
813
813
merge (left_w_dups , right_w_dups , on = 'a' , validate = 'many_to_many' )
814
814
815
- with pytest .raises (ValueError ):
815
+ with pytest .raises (MergeError ):
816
816
merge (left_w_dups , right_w_dups , left_index = True ,
817
817
right_index = True , validate = 'many_to_one' )
818
818
819
- with pytest .raises (ValueError ):
819
+ with pytest .raises (MergeError ):
820
820
merge (left_w_dups , right_w_dups , on = 'a' ,
821
821
validate = 'one_to_many' )
822
822
@@ -842,7 +842,7 @@ def test_validation(self):
842
842
'um... weasel noise?' ]},
843
843
index = range (3 ))
844
844
845
- with pytest .raises (ValueError ):
845
+ with pytest .raises (MergeError ):
846
846
merge (left , right , on = 'a' , validate = '1:1' )
847
847
848
848
result = merge (left , right , on = ['a' , 'b' ], validate = '1:1' )
0 commit comments