Skip to content

Commit

Permalink
added test for city services extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandrro committed Aug 29, 2024
1 parent bb8057c commit 6616065
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tests/test_events_modelling.py

This file was deleted.

19 changes: 19 additions & 0 deletions tests/test_services_extractor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pytest
import pandas as pd
from sloyka import City_services

@pytest.fixture
def sample_dataframe():
s_data = {'Текст комментария': {203: 'Когда уже на Юго западе будет метро? Весь день в пути проводим!',
204: 'Вся улица Жуковского и Восстания заклеена рекламой! Почему не действует полиция и администрация с ЖСК-1 ?'},
'message_id': {203: 195, 204: 196}}
return pd.DataFrame(s_data)

@pytest.fixture
def model():
return City_services()

def test_services(model, sample_dataframe):
result = model.run(sample_dataframe, "Текст комментария")
print(result)
assert result.iloc[0]["City_services"][0] == "Метро"

0 comments on commit 6616065

Please sign in to comment.