예제 #1
0
def test_id_str_of_downstream_vertex_is_higher_than_upstream(
        jvm_view: JVMView) -> None:
    hyper_params = Vertex(jvm_view.GaussianVertex, 0., 1.)
    gaussian = Vertex(jvm_view.GaussianVertex, 0., hyper_params)

    hyper_params_id = hyper_params.get_id()
    gaussian_id = gaussian.get_id()

    assert type(hyper_params_id) == tuple
    assert type(gaussian_id) == tuple

    assert hyper_params_id < gaussian_id
예제 #2
0
def test_get_vertex_id(jvm_view: JVMView) -> None:
    gaussian = Vertex(jvm_view.GaussianVertex, 0., 1.)

    java_id = gaussian.unwrap().getId().getValue()
    python_id = gaussian.get_id()

    assert all(value in python_id for value in java_id)
예제 #3
0
def test_construct_vertex_with_java_vertex(jvm_view: JVMView) -> None:
    java_vertex = Gaussian(0., 1.).unwrap()
    python_vertex = Vertex(java_vertex)

    assert tuple(java_vertex.getId().getValue()) == python_vertex.get_id()