def test_iqr_detector_fit_detect_matching_width(self):
        """Widths of series should match the number of values given for `scale`,
        if more than one value is provided.

        `self.train` series has only one component whereas model is created with 2/3 values"""
        detector = IQRDetector(scale=[1.5, 1.5])

        # during training
        with pytest.raises(ValueError):
            detector.fit(self.train)
        with pytest.raises(ValueError):
            detector.fit([self.train, self.mts_train])

        # during detection
        detector.fit(self.mts_train)
        with pytest.raises(ValueError):
            detector.detect(self.train)
        with pytest.raises(ValueError):
            detector.detect([self.train, self.mts_train])

        # single `scale` but fit to wrong widths
        detector = IQRDetector(scale=1.5)
        detector.fit(self.train)
        with pytest.raises(ValueError):
            detector.detect(self.mts_train)

        detector = IQRDetector(scale=1.5)
        detector.fit(self.mts_train)
        with pytest.raises(ValueError):
            detector.detect(self.train)

        detector = IQRDetector(scale=[1.5])
        detector.fit(self.mts_train)
        with pytest.raises(ValueError):
            detector.detect(self.train)
Widths of series should match the number of values given for `scale`,
        if more than one value is provided.

        `self.train` series has only one component whereas model is created with 2/3 values
darts/tests/ad/test_detectors.py