test_links.py 文件源码

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

项目:chihu 作者: yelongyu 项目源码 文件源码
def test_end_of_sentence():
    """example.com. should match."""
    out = '<a href="http://{0!s}" rel="nofollow">{0!s}</a>{1!s}'
    intxt = '{0!s}{1!s}'

    def check(u, p):
        eq_(out.format(u, p),
            linkify(intxt.format(u, p)))

    tests = (
        ('example.com', '.'),
        ('example.com', '...'),
        ('ex.com/foo', '.'),
        ('ex.com/foo', '....'),
    )

    for u, p in tests:
        yield check, u, p
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号