Add unit tests for py_debug_graph module
This commit introduces a comprehensive suite of unit tests for the py_debug_graph module, which is responsible for building debug graphs in Python. The tests cover various scenarios including linked lists, cycles, scalar values, and the handling of local and global variables in the debugging context. Additionally, it verifies the behavior of the debug_graph function and ensures that the builtins.root patch works as intended. These tests aim to enhance the reliability and robustness of the debugging functionality.
This commit is contained in:
@@ -418,7 +418,12 @@ def main():
|
||||
expr="$debug_graph(top)",
|
||||
verify=verify_top_delves_into_list,
|
||||
)
|
||||
ok_rust = dump("rust", "rust-gdb", str(REPO / "target" / "debug" / "list_example"), "src/main.rs", 51, out_dir)
|
||||
ok_rust = dump("rust", "rust-gdb", str(REPO / "target" / "debug" / "list_example"), "src/main.rs", 57, out_dir)
|
||||
ok_rust_top = dump(
|
||||
"rust_top", "rust-gdb", str(REPO / "target" / "debug" / "list_example"), "src/main.rs", 57, out_dir,
|
||||
expr="$debug_graph(top)",
|
||||
verify=verify_top_delves_into_list,
|
||||
)
|
||||
|
||||
python_bin = find_debugpy_python()
|
||||
python_script = REPO / "python" / "main.py"
|
||||
@@ -429,7 +434,7 @@ def main():
|
||||
verify=verify_top_delves_into_list_py,
|
||||
)
|
||||
|
||||
if not (ok_cpp and ok_cpp_top and ok_rust and ok_python and ok_python_top):
|
||||
if not (ok_cpp and ok_cpp_top and ok_rust and ok_rust_top and ok_python and ok_python_top):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user