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

        stime = time(0, 0)
        etime = time(1, 0)
        msg = (
            "Deprecated arguments `include_start` and `include_end` cannot be "
            "passed if `inclusive` has been given."
        )
        with pytest.raises(ValueError, match=msg):
            ts.between_time(stime, etime, include_start, include_end, inclusive="left")