コード例 #1
0
 def test_disallow_setting_tz(self, tz):
     # GH 3746
     ts = Timestamp('2010')
     with pytest.raises(AttributeError):
         ts.tz = tz
コード例 #2
0
ファイル: test_constructors.py プロジェクト: zoehuang7/pandas
 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
コード例 #3
0
 def test_disallow_setting_tz(self, tz):
     # GH 3746
     ts = Timestamp('2010')
     with pytest.raises(AttributeError):
         ts.tz = tz