Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

correction to test_program.py

Omar Khattab6e4714bafcbf
diff --git a/tests/primitives/test_program.py b/tests/primitives/test_program.py
index 2fe08741b..219ad5259 100644
--- a/tests/primitives/test_program.py
+++ b/tests/primitives/test_program.py
@@ -126,9 +126,9 @@ def test_complex_module_traversal():
"self",
"self.sub_module",
"self.sub_module.nested_list[0]",
- # "self.sub_module.nested_list[1][key]", # NEW: NO recursive structures
+ "self.sub_module.nested_list[1][key]", # NOTE: named_sub_modules allows recursive structures
"self.sub_module.nested_tuple[0]",
- # "self.sub_module.nested_tuple[1][0]", # NEW: NO recursive structures
+ "self.sub_module.nested_tuple[1][0]", # NEW: named_sub_modules allows recursive structures, but named_prameters does not
# "self.sub_module.nested_tuple[1][1]", This should not be included, as it's the same module as the previous one
}
found_names = {name for name, _ in root.named_sub_modules()}