def test_diff_dropna_and_component_mask_specified(self):
        """
        Tests that `Diff` throws error during `fit` if `component_mask` is specified
        when `dropna = True`; can't allow this since undifferenced components will be different
        length to differenced components.
        """
        diff = Diff(lags=1, dropna=True)
        with pytest.raises(ValueError) as e:
            diff.fit(self.sine_series, component_mask=np.array([1, 0, 1], dtype=bool))
        assert (
            "Cannot specify `component_mask` with `dropna = True`, "
            "since differenced and undifferenced components will be "
            "of different lengths."
        ) == str(e.value)

        Tests that `Diff` throws error during `fit` if `component_mask` is specified
        when `dropna = True`; can't allow this since undifferenced components will be different
        length to differenced components.
        
darts/tests/dataprocessing/transformers/test_diff.py