Commit 50c43972 authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

These tests were already working

parent a0805626
...@@ -255,7 +255,6 @@ template <enum ExceptionStyle S> Box* dictGetitem(BoxedDict* self, Box* k) noexc ...@@ -255,7 +255,6 @@ template <enum ExceptionStyle S> Box* dictGetitem(BoxedDict* self, Box* k) noexc
// Special-case defaultdict, assuming that it's the main time we will actually hit this. // Special-case defaultdict, assuming that it's the main time we will actually hit this.
// We could just use a single runtime IC here, or have a small cache that maps type->runtimeic. // We could just use a single runtime IC here, or have a small cache that maps type->runtimeic.
// Or use a polymorphic runtime ic. // Or use a polymorphic runtime ic.
assert(0 && "check refcounting");
static BoxedClass* defaultdict_cls = NULL; static BoxedClass* defaultdict_cls = NULL;
static CallattrIC defaultdict_ic; static CallattrIC defaultdict_ic;
if (defaultdict_cls == NULL && strcmp(self->cls->tp_name, "collections.defaultdict") == 0) { if (defaultdict_cls == NULL && strcmp(self->cls->tp_name, "collections.defaultdict") == 0) {
......
# expected: reffail
import collections import collections
o = collections.OrderedDict() o = collections.OrderedDict()
......
# expected: reffail
class MyDict(dict): class MyDict(dict):
pass pass
......
# expected: reffail
import sys import sys
def f(): def f():
# By the time of the f_locals call, x will only be alive because # By the time of the f_locals call, x will only be alive because
...@@ -6,7 +5,7 @@ def f(): ...@@ -6,7 +5,7 @@ def f():
x = 100.0 ** 10 x = 100.0 ** 10
for i in xrange(10000): for i in xrange(10000):
200.0 * 200.0 200.0 * 200.0
print sys._getframe(0).f_locals print sorted(sys._getframe(0).f_locals.items())
# Avoid testing the lifetime of i by keeping it alive here: # Avoid testing the lifetime of i by keeping it alive here:
print i print i
...@@ -18,9 +17,8 @@ def f(): ...@@ -18,9 +17,8 @@ def f():
y = 100 * 100 y = 100 * 100
for i in xrange(10000): for i in xrange(10000):
200 * 200 200 * 200
print sys._getframe(0).f_locals print sorted(sys._getframe(0).f_locals.items())
# Avoid testing the lifetime of i by keeping it alive here: # Avoid testing the lifetime of i by keeping it alive here:
print i print i
trap()
f() f()
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