Spaces:
Runtime error
Runtime error
Susanna Anil commited on
Commit ·
1b4e06d
1
Parent(s): d87e477
add test
Browse files- Makefile +3 -0
- test_app.py +6 -0
Makefile
CHANGED
|
@@ -8,6 +8,9 @@ format:
|
|
| 8 |
lint:
|
| 9 |
pylint --disable=R,C app.py
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
run:
|
| 12 |
#run docker
|
| 13 |
docker run -p 127.0.0.1:8080:8080 1896dd6bda62
|
|
|
|
| 8 |
lint:
|
| 9 |
pylint --disable=R,C app.py
|
| 10 |
|
| 11 |
+
test:
|
| 12 |
+
python -m pytest -vv test_app.py
|
| 13 |
+
|
| 14 |
run:
|
| 15 |
#run docker
|
| 16 |
docker run -p 127.0.0.1:8080:8080 1896dd6bda62
|
test_app.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from app import extract_comments
|
| 2 |
+
|
| 3 |
+
url = "https://www.reddit.com/r/europe/comments/r0hthg/sweden_is_taking_the_lead_to_persuade_the_rest_of/"
|
| 4 |
+
|
| 5 |
+
def test_classifier(input_url = url):
|
| 6 |
+
return extract_comments(input_url)
|