tests.py 文件源码

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

项目:tzcron 作者: bloomberg 项目源码 文件源码
def test_end_dst_double_occurrence(self):
        cron_expression = "30 1 * * * *"
        timezone = pytz.timezone("Europe/London")
        start = dt.datetime.strptime('2015-10-25T00:00:00',
                                     "%Y-%m-%dT%H:%M:%S")
        start = timezone.localize(start, is_dst=True)
        testee = tzcron.Schedule(cron_expression, timezone, start)
        self.assertRaises(pytz.AmbiguousTimeError,
                          lambda: next(testee))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号