@@ -2481,9 +2481,9 @@ def test_backwards_compat_without_term_object(self):
2481
2481
major_axis = date_range ('1/1/2000' , periods = 5 ),
2482
2482
minor_axis = ['A' , 'B' , 'C' , 'D' ])
2483
2483
store .append ('wp' ,wp )
2484
-
2485
- result = store .select ('wp' , [('major_axis>20000102' ),
2486
- ('minor_axis' , '=' , ['A' ,'B' ]) ])
2484
+ with tm . assert_produces_warning ( expected_warning = DeprecationWarning ):
2485
+ result = store .select ('wp' , [('major_axis>20000102' ),
2486
+ ('minor_axis' , '=' , ['A' ,'B' ]) ])
2487
2487
expected = wp .loc [:,wp .major_axis > Timestamp ('20000102' ),['A' ,'B' ]]
2488
2488
assert_panel_equal (result , expected )
2489
2489
@@ -2500,22 +2500,24 @@ def test_backwards_compat_without_term_object(self):
2500
2500
store .append ('wp' ,wp )
2501
2501
2502
2502
# stringified datetimes
2503
- result = store .select ('wp' , [('major_axis' ,'>' ,datetime .datetime (2000 ,1 ,2 ))])
2503
+ with tm .assert_produces_warning (expected_warning = DeprecationWarning ):
2504
+ result = store .select ('wp' , [('major_axis' ,'>' ,datetime .datetime (2000 ,1 ,2 ))])
2504
2505
expected = wp .loc [:,wp .major_axis > Timestamp ('20000102' )]
2505
2506
assert_panel_equal (result , expected )
2506
-
2507
- result = store .select ('wp' , [('major_axis' ,'>' ,datetime .datetime (2000 ,1 ,2 ,0 ,0 ))])
2507
+ with tm . assert_produces_warning ( expected_warning = DeprecationWarning ):
2508
+ result = store .select ('wp' , [('major_axis' ,'>' ,datetime .datetime (2000 ,1 ,2 ,0 ,0 ))])
2508
2509
expected = wp .loc [:,wp .major_axis > Timestamp ('20000102' )]
2509
2510
assert_panel_equal (result , expected )
2510
-
2511
- result = store .select ('wp' , [('major_axis' ,'=' ,[datetime .datetime (2000 ,1 ,2 ,0 ,0 ),datetime .datetime (2000 ,1 ,3 ,0 ,0 )])])
2511
+ with tm .assert_produces_warning (expected_warning = DeprecationWarning ):
2512
+ result = store .select ('wp' , [('major_axis' ,'=' ,[datetime .datetime (2000 ,1 ,2 ,0 ,0 ),
2513
+ datetime .datetime (2000 ,1 ,3 ,0 ,0 )])])
2512
2514
expected = wp .loc [:,[Timestamp ('20000102' ),Timestamp ('20000103' )]]
2513
2515
assert_panel_equal (result , expected )
2514
-
2515
- result = store .select ('wp' , [('minor_axis' ,'=' ,['A' ,'B' ])])
2516
+ with tm . assert_produces_warning ( expected_warning = DeprecationWarning ):
2517
+ result = store .select ('wp' , [('minor_axis' ,'=' ,['A' ,'B' ])])
2516
2518
expected = wp .loc [:,:,['A' ,'B' ]]
2517
2519
assert_panel_equal (result , expected )
2518
-
2520
+
2519
2521
def test_same_name_scoping (self ):
2520
2522
2521
2523
with ensure_clean_store (self .path ) as store :
0 commit comments