test_datetools.py 文件源码

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

项目:smartchangelog 作者: ngouzy 项目源码 文件源码
def test_date2str():
    # GIVEN
    expected = '2017-03-21 16:09:13 +0100'
    dt = datetime(
        year=2017,
        month=3,
        day=21,
        hour=16,
        minute=9,
        second=13,
        tzinfo=timezone(timedelta(hours=1))
    )
    # WHEN
    string = datetools.date2str(dt)
    # THEN
    assert string == expected
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号