InternetHealthReport / internet-yellow-pages

A knowledge graph for the Internet
https://iyp.iijlab.net
GNU General Public License v3.0
44 stars 18 forks source link

unit test issue #19 #35

Closed mhmdahmedfathi closed 1 year ago

mhmdahmedfathi commented 1 year ago

to solve the issue https://github.com/InternetHealthReport/internet-yellow-pages/issues/19 unit_test.py file is in the root directory, you can run it like any other Python file. "python3 unit_test.py" The script runs all the crawlers and post scripts and sends an additional argument , "unit_test",to each one so they can start testing.

unit_test.py

In the base crawler, add two methods:

and for all crawlers added: check if there is an additional arg "unit_test," and if yes, then it runs the unit test method.

for the postscripts

     -  add two methods :

romain-fontugne commented 1 year ago

Thanks, that's very close to be merged. Can you please make sure all the call to the crawler close method are outside of the else statement (I have commented only one but this happened several times)