class_docstr: Test frequency conversion of date objects
class_docstr_tok: ["Test","frequency","conversion","of","date","objects"]
code: def test_conv_weekly_legacy(self):
      # frequency conversion tests: from Weekly Frequency
      msg = INVALID_FREQ_ERR_MSG
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK", year=2007, month=1, day=1)
  
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-SAT", year=2007, month=1, day=6)
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-FRI", year=2007, month=1, day=5)
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-THU", year=2007, month=1, day=4)
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-WED", year=2007, month=1, day=3)
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-TUE", year=2007, month=1, day=2)
      with pytest.raises(ValueError, match=msg):
          Period(freq="WK-MON", year=2007, month=1, day=1)
  
imports: import pytest
  from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
  from pandas.errors import OutOfBoundsDatetime
  from pandas import Period, Timestamp, offsets
  import pandas._testing
label_desc: Use image node_id 9 for calling the TestFreqConversion obj's underlying member method code with example usage: obj.test_conv_weekly_legacy() without return types