def test_fit_detect(self):
        """Calling fit() then detect() and fit_detect() should yield the same results"""
        detector1 = QuantileDetector(low_quantile=0.05, high_quantile=0.95)
        detector1.fit(self.train)
        prediction1 = detector1.detect(self.train)

        detector2 = QuantileDetector(low_quantile=0.05, high_quantile=0.95)
        prediction2 = detector2.fit_detect(self.train)

        assert prediction1 == prediction2
Calling fit() then detect() and fit_detect() should yield the same results
darts/tests/ad/test_detectors.py