77
88@pytest .fixture
99def graph_config ():
10+ """
11+ Configuration of the graph
12+ """
1013 return {
1114 "llm" : {
1215 "model" : "ollama/mistral" ,
@@ -22,34 +25,33 @@ def graph_config():
2225 }
2326
2427
25- def test_scraping_pipeline (graph_config ):
26- # Crea un'istanza di SmartScraperGraph
28+ def test_scraping_pipeline (graph_config : dict ):
29+ """
30+ Start of the scraping pipeline
31+ """
2732 smart_scraper_graph = SmartScraperGraph (
2833 prompt = "List me all the news with their description." ,
2934 source = "https://perinim.github.io/projects" ,
3035 config = graph_config
3136 )
3237
33- # Esegui il grafico
3438 result = smart_scraper_graph .run ()
3539
36- # Verifica che il risultato non sia vuoto
3740 assert result is not None
3841
3942
40- def test_get_execution_info (graph_config ):
41- # Crea un'istanza di SmartScraperGraph
43+ def test_get_execution_info (graph_config : dict ):
44+ """
45+ Get the execution info
46+ """
4247 smart_scraper_graph = SmartScraperGraph (
4348 prompt = "List me all the news with their description." ,
4449 source = "https://perinim.github.io/projects" ,
4550 config = graph_config
4651 )
4752
48- # Esegui il grafico
4953 smart_scraper_graph .run ()
5054
51- # Ottieni le informazioni sull'esecuzione del grafico
5255 graph_exec_info = smart_scraper_graph .get_execution_info ()
5356
54- # Verifica che le informazioni sull'esecuzione non siano vuote
5557 assert graph_exec_info is not None
0 commit comments