test_regex.py 文件源码

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

项目:hypothesis-regex 作者: maximkulkin 项目源码 文件源码
def assert_can_generate(pattern):
    '''
    Checks that regex strategy for given pattern generates examples
    that match that regex pattern
    '''
    compiled_pattern = re.compile(pattern)
    strategy = regex(pattern)

    assert_all_examples(strategy, compiled_pattern.match)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号