(model, documents, request)
| 14 | ], |
| 15 | ) |
| 16 | def test_online_cv(model, documents, request): |
| 17 | topic_model = copy.deepcopy(request.getfixturevalue(model)) |
| 18 | vectorizer_model = OnlineCountVectorizer(stop_words="english", ngram_range=(2, 2)) |
| 19 | |
| 20 | topics = [topic_model.get_topic(topic) for topic in set(topic_model.topics_)] |
| 21 | topic_model.update_topics(documents, vectorizer_model=vectorizer_model) |
| 22 | new_topics = [topic_model.get_topic(topic) for topic in set(topic_model.topics_)] |
| 23 | |
| 24 | for old_topic, new_topic in zip(topics, new_topics): |
| 25 | if old_topic[0][0] != "": |
| 26 | assert old_topic != new_topic |
| 27 | |
| 28 | |
| 29 | @pytest.mark.parametrize("model", [("online_topic_model")]) |
nothing calls this directly
no test coverage detected