Commit e6b7d6c0 authored by Kevin Modzelewski's avatar Kevin Modzelewski

A few misc test updates / fixes

parent d4831adb
......@@ -678,15 +678,14 @@ extern "C" void PyThread_delete_key_value(int key) noexcept {
extern "C" PyObject* _PyThread_CurrentFrames(void) noexcept {
assert(0 && "check refcounting");
try {
LOCK_REGION(&threading_lock);
BoxedDict* result = new BoxedDict;
BoxedDict* result = new BoxedDict();
for (auto& pair : current_threads) {
FrameInfo* frame_info = (FrameInfo*)pair.second->public_thread_state->frame_info;
Box* frame = getFrame(frame_info);
assert(frame);
result->d[boxInt(pair.first)] = frame;
PyDict_SetItem(result, autoDecref(boxInt(pair.first)), frame);
}
return result;
} catch (ExcInfo) {
......
......@@ -4836,6 +4836,10 @@ extern "C" void Py_Finalize() noexcept {
_PyUnicode_Fini();
PyInterpreterState_Clear(PyThreadState_GET()->interp);
for (auto b : constants) {
Py_DECREF(b);
}
constants.clear();
for (auto b : late_constants) {
Py_DECREF(b);
}
......
# expected: reffail
# - cleaning up a paused generator?
# - generator abandonment
import os
import sys
import subprocess
......
# expected: reffail
# - generator abandonment
def wrapper(f):
return f
......
# expected: reffail
# - generator abandonment
import sys
import os
import subprocess
......
# expected: reffail
# this is copied out of cpythons test_sys.py and adopted to use assert stmts
import sys
import thread
......
# expected: reffail
print repr(unicode())
print repr(unicode('hello world'))
print unicode('hello world')
......
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