docstr: Tests if monthly series aligned with quarters is transformed into a quarterly series in the expected way.
docstr_tok: ["Tests","if","monthly","series","aligned","with","quarters","is","transformed","into","a","quarterly","series","in","the","expected","way","."]
code: def test_complete_monthly_to_quarterly(self):
      """
      Tests if monthly series aligned with quarters is transformed into a quarterly series in the expected way.
      """
      # to quarter start
      midas_1 = MIDAS(low_freq="QS")
      quarterly_ts_midas = midas_1.fit_transform(self.monthly_ts)
      assert quarterly_ts_midas == self.quarterly_ts
  
      inversed_quarterly_ts_midas = midas_1.inverse_transform(
          quarterly_ts_midas
      )
      assert self.monthly_ts == inversed_quarterly_ts_midas
  
      # to quarter end
      midas_2 = MIDAS(low_freq="Q")
      quarterly_ts_midas = midas_2.fit_transform(self.monthly_ts)
      assert (
          quarterly_ts_midas == self.quarterly_with_quarter_end_index_ts
      )
  
      inversed_quarterly_ts_midas = midas_2.inverse_transform(
          quarterly_ts_midas
      )
      assert self.monthly_ts == inversed_quarterly_ts_midas
  
imports: import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.dataprocessing.transformers import MIDAS
  from darts.models import LinearRegressionModel
  from darts.utils.timeseries_generation import generate_index, linear_timeseries
label_desc: Use image node_id 1 for calling the TestMIDAS obj's underlying member method code with example usage: obj.test_complete_monthly_to_quarterly() without return types