@@ -4052,6 +4052,7 @@ def test_append_to_multiple_dropna(self):
4052
4052
df = concat ([df1 , df2 ], axis = 1 )
4053
4053
4054
4054
with ensure_clean_store (self .path ) as store :
4055
+
4055
4056
# dropna=True should guarantee rows are synchronized
4056
4057
store .append_to_multiple (
4057
4058
{'df1' : ['A' , 'B' ], 'df2' : None }, df , selector = 'df1' ,
@@ -4062,14 +4063,27 @@ def test_append_to_multiple_dropna(self):
4062
4063
tm .assert_index_equal (store .select ('df1' ).index ,
4063
4064
store .select ('df2' ).index )
4064
4065
4066
+ @pytest .mark .xfail (run = False ,
4067
+ reason = "append_to_multiple_dropna_false "
4068
+ "is not raising as failed" )
4069
+ def test_append_to_multiple_dropna_false (self ):
4070
+ df1 = tm .makeTimeDataFrame ()
4071
+ df2 = tm .makeTimeDataFrame ().rename (columns = lambda x : "%s_2" % x )
4072
+ df1 .iloc [1 , df1 .columns .get_indexer (['A' , 'B' ])] = np .nan
4073
+ df = concat ([df1 , df2 ], axis = 1 )
4074
+
4075
+ with ensure_clean_store (self .path ) as store :
4076
+
4065
4077
# dropna=False shouldn't synchronize row indexes
4066
4078
store .append_to_multiple (
4067
- {'df1 ' : ['A' , 'B' ], 'df2 ' : None }, df , selector = 'df1 ' ,
4079
+ {'df1a ' : ['A' , 'B' ], 'df2a ' : None }, df , selector = 'df1a ' ,
4068
4080
dropna = False )
4069
- self .assertRaises (
4070
- ValueError , store .select_as_multiple , ['df1' , 'df2' ])
4071
- assert not store .select ('df1' ).index .equals (
4072
- store .select ('df2' ).index )
4081
+
4082
+ with pytest .raises (ValueError ):
4083
+ store .select_as_multiple (['df1a' , 'df2a' ])
4084
+
4085
+ assert not store .select ('df1a' ).index .equals (
4086
+ store .select ('df2a' ).index )
4073
4087
4074
4088
def test_select_as_multiple (self ):
4075
4089
0 commit comments