tests.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:tzcron 作者: bloomberg 项目源码 文件源码
def test_start_dst_invalid_occurrence(self):
        """Test that tzcron updates the offset when moving to DST"""
        cron_expression = "30 1 * * * *"
        timezone = pytz.timezone("Europe/London")
        start = dt.datetime.strptime('2015-03-29T00:00:00',
                                     "%Y-%m-%dT%H:%M:%S")
        start = timezone.localize(start, is_dst=False)
        testee = tzcron.Schedule(cron_expression, timezone, start)
        self.assertRaises(pytz.NonExistentTimeError,
                          lambda: next(testee))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号