Commit c7808da7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Get 'import gc' working

I guess a number of tests do this to help with testing
parent 7585d73e
......@@ -1431,6 +1431,8 @@ initgc(void)
tmod = PyImport_ImportModuleNoBlock("time");
if (tmod == NULL)
PyErr_Clear();
else
PyGC_RegisterStaticConstant(tmod);
}
#define ADD_INT(NAME) if (PyModule_AddIntConstant(m, #NAME, NAME) < 0) return
......
# expected: reffail
# Regression test: this triggers a bug in the way we guard for boxedfunctions and their closures.
# In particular, we guard on the specific value of a BoxedFunction to say that it is the same, but
# it's possible for the function to get destructed and then a new (and different) boxedfunction to
......
# expected: reffail
import gc
def open_lots_of_files():
......
# expected: reffail
# these may seem pointless, but they exercise a family of corner cases in our
# CFG generation pass (cfg.cpp).
def returner():
......
# expected: reffail
import gc
import select
......
# expected: reffail
# This file isn't really meant to be run as a test, though it won't really
# make a difference.
......
# expected: reffail
import weakref
import gc
......
# expected: reffail
# Make sure we can subclass from weakref.ref, since the weakref module itself does this
from weakref import ref
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment