def test_between_time_warn(self, include_start, include_end, frame_or_series):
        # GH40245
        rng = date_range("1/1/2000", "1/5/2000", freq="5min")
        ts = DataFrame(np.random.randn(len(rng), 2), index=rng)
        ts = tm.get_obj(ts, frame_or_series)

        stime = time(0, 0)
        etime = time(1, 0)

        match = (
            "`include_start` and `include_end` "
            "are deprecated in favour of `inclusive`."
        )
        with tm.assert_produces_warning(FutureWarning, match=match):
            _ = ts.between_time(stime, etime, include_start, include_end)