text-summary-app / test_app.py
stestoni91
Add simple test for main
fd65885
raw
history blame
257 Bytes
from app import predict
import wikipedia
wikipedia.set_lang("it")
import warnings
warnings.filterwarnings("ignore")
def test_predict():
text = wikipedia.summary('Sardegna', sentences=10)
summary = predict(text)
assert len(text) > len(summary)