test_model.py 文件源码

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

项目:pyblish-lite 作者: pyblish 项目源码 文件源码
def test_label_nonstring():
    """Logging things that aren't string is fine"""

    result = {
        "records": [
            logging.LogRecord("root", "INFO", "", 0, msg, [], None)
            for msg in (
                "Proper message",
                12,
                {"a": "dict"},
                list(),
                1.0,
            )
        ],
        "error": None
    }

    model_ = model.Terminal()
    model_.update_with_result(result)

    for item in model_:
        assert isinstance(item.data(model.Label), six.text_type), (
            "\"%s\" wasn't a string!" % item.data(model.Label))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号