コード例 #1
0
def test_predict_json_error():
    with pytest.raises(RuntimeError):
        predict.predict_json(PROJECT,
                             MODEL, [{
                                 "foo": "bar"
                             }],
                             version=JSON_VERSION)
コード例 #2
0
def test_predict_json_error():
    with pytest.raises(RuntimeError):
        predict.predict_json(
            PROJECT, MODEL, [{"foo": "bar"}], version=JSON_VERSION)
コード例 #3
0
def test_predict_json():
    result = predict.predict_json(PROJECT,
                                  MODEL, [JSON, JSON],
                                  version=JSON_VERSION)
    assert [EXPECTED_OUTPUT, EXPECTED_OUTPUT] == result
コード例 #4
0
def test_predict_json():
    result = predict.predict_json(
        PROJECT, MODEL, [JSON, JSON], version=JSON_VERSION)
    assert [EXPECTED_OUTPUT, EXPECTED_OUTPUT] == result