Commit 1077e8c7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

These tests are passing now

parent 9460cd19
# expected: reffail
import _collections import _collections
d = _collections.deque() d = _collections.deque()
......
# expected: reffail
import array import array
a = array.array("c", "hello world") a = array.array("c", "hello world")
print type(a) print type(a)
......
# expected: reffail
# Augassigns are somewhat odd because they encode both a use and a def of a variable. # Augassigns are somewhat odd because they encode both a use and a def of a variable.
# So for the sake of determining if a scope sets a variable, they count as a def, but # So for the sake of determining if a scope sets a variable, they count as a def, but
# for the sake of whether or not a variable is live, they count as a use. # for the sake of whether or not a variable is live, they count as a use.
......
# expected: reffail
x = 1 x = 1
def f(): def f():
if 0: if 0:
......
# expected: reffail
for i in range(10): for i in range(10):
print i print i
for i in xrange(1, 15, 2): for i in xrange(1, 15, 2):
......
# expected: reffail
class C(object): class C(object):
def __iter__(self): def __iter__(self):
print "orig iter" print "orig iter"
......
# expected: reffail
# getitem # getitem
def f(l): def f(l):
......
# expected: reffail
try: try:
import non_existent_module import non_existent_module
assert 0, "shouldn't get here" assert 0, "shouldn't get here"
......
# expected: reffail
import os import os
try: try:
os.unlink('example.db') os.unlink('example.db')
......
# expected: reffail
# we have one test at global scope, another at local. # we have one test at global scope, another at local.
# they behave differently in codegen; there have been points at which either was bugged when the other was not. # they behave differently in codegen; there have been points at which either was bugged when the other was not.
try: try:
......
# expected: reffail
def f(): def f():
try: try:
# Looks like this returns from the function, but it needs to go to the finally block # Looks like this returns from the function, but it needs to go to the finally block
......
# expected: reffail
def f(): def f():
print (1,2,3)[-1] print (1,2,3)[-1]
f() f()
......
# expected: reffail
# Regression test: make sure that we can handle various kinds of written type errors. # Regression test: make sure that we can handle various kinds of written type errors.
# ex if we can prove that an expression would throw an error due to type issues, we should # ex if we can prove that an expression would throw an error due to type issues, we should
# still compile and run the function just fine. # still compile and run the function just fine.
......
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