MCPcopy Create free account
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / test_config_deepcopy

Function test_config_deepcopy

tests/test_csv_scraper_multi_graph.py:103–116  ·  view source on GitHub ↗

Test that the configuration dictionary is deep-copied. Modifying the original config after instantiation should not affect the multi_graph copy.

()

Source from the content-addressed store, hash-verified

101
102
103def test_config_deepcopy():
104 """Test that the configuration dictionary is deep-copied.
105 Modifying the original config after instantiation should not affect the multi_graph copy.
106 """
107 config = {
108 "llm": {"model": "dummy_model", "provider": "provider1"},
109 "nested": {"a": [1, 2]},
110 }
111 original_config = deepcopy(config)
112 multi_graph = CSVScraperMultiGraph("Deep copy test", ["url_deep"], config)
113 # Modify the original config after instantiation
114 config["nested"]["a"].append(3)
115 # The multi_graph.copy_config should remain unchanged.
116 assert multi_graph.copy_config["nested"]["a"] == original_config["nested"]["a"]
117
118
119def test_run_argument_passing():

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected