@@ -525,12 +525,11 @@ def test_window_datetime() -> None:
525525 # Test datetime and Nones
526526 win = buffer .window (None , None )
527527 assert [0 , np .nan , 2 , 3 , 4 ] == list (win )
528- with pytest .raises (ValueError ):
529- win = buffer .window (dt (0 ), None )
530- #assert [0, np.nan, 2, 3, 4] == list(win) # should not raise
531- with pytest .raises (ValueError ):
532- win = buffer .window (None , dt (4 ))
533- #assert [0, np.nan, 2, 3, 4] == list(win) # should not raise
528+ win = buffer .window (dt (0 ), None )
529+ assert [0 , np .nan , 2 , 3 , 4 ] == list (win )
530+ win = buffer .window (None , dt (5 ))
531+ assert [0 , np .nan , 2 , 3 , 4 ] == list (win )
532+
534533 win = buffer .window (dt (0 ), dt (3 ), force_copy = False , fill_value = None )
535534 assert [0 , np .nan , 2 ] == list (win )
536535 buffer ._buffer [1 ] = 1 # pylint: disable=protected-access
@@ -606,15 +605,6 @@ def test_window_index_fill_value() -> None:
606605def test_window_fail () -> None :
607606 """Test the window function with invalid arguments."""
608607 buffer = get_orb ([0.0 , 1.0 , 2.0 , 3.0 , 4.0 ])
609- # Go crazy with the indices
610- with pytest .raises (IndexError ):
611- buffer .window (dt (1 ), 3 )
612- with pytest .raises (IndexError ):
613- buffer .window (1 , dt (3 ))
614- with pytest .raises (IndexError ):
615- buffer .window (None , dt (2 ))
616- with pytest .raises (IndexError ):
617- buffer .window (dt (2 ), None )
618608 # Invalid argument combination
619609 with pytest .raises (ValueError ):
620610 buffer .window (0 , 1 , force_copy = False , fill_value = 0 )
0 commit comments