def test_disallow_setting_tz(self, tz): # GH 3746 ts = Timestamp('2010') with pytest.raises(AttributeError): ts.tz = tz
def test_disallow_setting_tz(self, tz): # GH 3746 ts = Timestamp("2010") msg = "Cannot directly set timezone" with pytest.raises(AttributeError, match=msg): ts.tz = tz