Spaces:
Sleeping
Sleeping
stestoni91
commited on
Commit
•
fd65885
1
Parent(s):
6105652
Add simple test for main
Browse files- test_app.py +11 -0
test_app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from app import predict
|
2 |
+
import wikipedia
|
3 |
+
wikipedia.set_lang("it")
|
4 |
+
import warnings
|
5 |
+
warnings.filterwarnings("ignore")
|
6 |
+
|
7 |
+
|
8 |
+
def test_predict():
|
9 |
+
text = wikipedia.summary('Sardegna', sentences=10)
|
10 |
+
summary = predict(text)
|
11 |
+
assert len(text) > len(summary)
|