コード例 #1
0
def test_convert_js_arg(arg, expected):
    if expected is TypeError:
        with pytest.raises(TypeError):
            javascript._convert_js_arg(arg)
    else:
        assert javascript._convert_js_arg(arg) == expected
コード例 #2
0
ファイル: test_javascript.py プロジェクト: meles5/qutebrowser
def test_convert_js_arg(arg, expected):
    if expected is TypeError:
        with pytest.raises(TypeError):
            javascript._convert_js_arg(arg)
    else:
        assert javascript._convert_js_arg(arg) == expected