plugin.py 文件源码

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

项目:pytest-pypom-navigation 作者: tierratelematics 项目源码 文件源码
def skip_by_skin_names(request, skin):
    """ Skip by skin name.

        We support validation for multi skin applications providing the best
        page object class match.

        We expect many failures we want to avoid because many tests will fail
        because the related page object implementation still not exists.

        If you want you can omit a test execution for a given skin adding a
        a ```@pytest.mark.skip_skins(['skin2'])``` decorator on your tests.

        Tests marked with a skin2 skip will be executed for all skins
        except for skin2.

        See http://bit.ly/2dYnOSv for further info.
    """
    if request.node.get_marker('skip_skins'):
        if skin in request.node.get_marker('skip_skins').args[0]:
            pytest.skip('skipped on this skin: {}'.format(skin))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号