MCPcopy
hub / github.com/MaartenGr/BERTopic / test_get_topic

Function test_get_topic

tests/test_representation/test_get.py:18–27  ·  view source on GitHub ↗
(model, request)

Source from the content-addressed store, hash-verified

16 ],
17)
18def test_get_topic(model, request):
19 topic_model = copy.deepcopy(request.getfixturevalue(model))
20 topics = [topic_model.get_topic(topic) for topic in set(topic_model.topics_)]
21 unknown_topic = topic_model.get_topic(500)
22
23 for topic in topics:
24 assert topic is not False
25
26 assert len(topics) == len(topic_model.get_topic_info())
27 assert not unknown_topic
28
29
30@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

get_topicMethod · 0.80
get_topic_infoMethod · 0.80

Tested by

no test coverage detected