Пример #1
0
def test_pretty_print():
    from linkpred.linkpred import pretty_print

    name = "foo"
    assert_equal(pretty_print(name), "foo")
    params = {"bar": 0.1, "baz": 5}
    assert_equal(pretty_print(name, params), "foo (baz = 5, bar = 0.1)")
Пример #2
0
def test_pretty_print():
    from linkpred.linkpred import pretty_print

    name = "foo"
    assert_equal(pretty_print(name), "foo")
    params = {"bar": 0.1, "baz": 5}

    # 2 possibilities because of hash randomization
    assert_in(pretty_print(name, params),
              ["foo (baz = 5, bar = 0.1)", "foo (bar = 0.1, baz = 5)"])
Пример #3
0
def test_pretty_print():
    from linkpred.linkpred import pretty_print

    name = "foo"
    assert_equal(pretty_print(name), "foo")
    params = {"bar": 0.1, "baz": 5}

    # 2 possibilities because of hash randomization
    assert_in(pretty_print(name, params), ["foo (baz = 5, bar = 0.1)",
                                           "foo (bar = 0.1, baz = 5)"])