mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Isolate GC ownership test from child automatic collection (#9196)
Disable automatic GC before creating the child cycle so the test measures only whether the parent forced collection can reach child-owned objects. Keep both assertions and the parent collection retry unchanged. Assisted-by: OpenAI Codex:model version unavailable
This commit is contained in:
1 parent
c208352caf
commit
23da4ac248
1 file changed
+1
@@ -1539,6 +1539,7 @@ mod tests {
|
||||
let sub = main.create_subinterpreter();
|
||||
|
||||
let sub_scope = sub.enter(|vm| {
|
||||
vm.state.gc.disable();
|
||||
let scope = vm.new_scope_with_builtins();
|
||||
run(vm, &scope, CYCLE);
|
||||
assert_eq!(live_nodes(vm), 2);
|
||||
|
||||
Reference in new issue
Block a user