Exemplo n.º 1
0
    def test_no_link(self):
        mapper = KeplerMapper()

        groups = {"a": [1, 2, 3, 4], "b": [5, 6, 7]}
        links = mapper._create_links(groups)

        assert not links
Exemplo n.º 2
0
    def test_finds_a_link(self):
        mapper = KeplerMapper()

        groups = {"a": [1, 2, 3, 4], "b": [1, 2, 3, 4]}
        links = mapper._create_links(groups)

        assert "a" in links or "b" in links
        assert links["a"] == ["b"] or links["b"] == ["a"]
Exemplo n.º 3
0
    def test_pass_through_result(self):
        mapper = KeplerMapper()

        groups = {"a": [1], "b": [2]}

        res = dict()
        links = mapper._create_links(groups, res)

        assert res == links