graphrag/tests/verbs/test_create_final_entities.py
Nathan Evans d17dfd01f9
Graph collapse (#1464)
* Refactor graph creation

* Semver

* Spellcheck

* Update integ pipeline

* Fix cast

* Improve pandas chaining

* Cleaner apply

* Use list comprehensions

---------

Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
2024-12-05 11:57:26 -06:00

25 lines
583 B
Python

# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License
from graphrag.index.flows.create_final_entities import (
create_final_entities,
)
from graphrag.index.workflows.v1.create_final_entities import (
workflow_name,
)
from .util import (
compare_outputs,
load_test_table,
)
def test_create_final_entities():
input = load_test_table("base_entity_nodes")
expected = load_test_table(workflow_name)
actual = create_final_entities(input)
compare_outputs(actual, expected)
assert len(actual.columns) == len(expected.columns)