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