Commit 9674585f authored by Kevin Modzelewski's avatar Kevin Modzelewski

[xxx -- to remove] Batch-label currently failing tests

Put a "expected: reffail" on any test that the tester thought was failing
(which includes a few that currently fail due to the llvm-only mode)

Used a different word (vs "fail") so that we can see whether it was failing
before refcounting or not.
parent 2b6d70d3
# expected: reffail
import _collections
d = _collections.deque()
......
# expected: reffail
def f((a,b)):
print a,b
print sorted(list(locals().iteritems()))
......
# expected: reffail
import array
a = array.array("c", "hello world")
print type(a)
......
# expected: reffail
# skip-if: '-x' in EXTRA_JIT_ARGS
# - CPython parser backend doesn't handle well the errors
# should_error
......
# expected: reffail
import _ast
def ast_parse(source, filename='<unknown>', mode='exec'):
......
# expected: reffail
# 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
# for the sake of whether or not a variable is live, they count as a use.
......
# expected: reffail
print `42`
print `int`
print `2+3`
......
# expected: reffail
# Regression test: we rely internally on CompilerType.nonzero() always returning a BOOL,
# in at least these two cases.
......
# expected: reffail
# Test that we can pass known-bool values through OSRs and what not:
def f(b):
......
# expected: reffail
s = 'Hello world'
t = buffer(s, 6, 5)
print t
......
# expected: reffail
import re
import inspect
def gen():
......
# expected: reffail
import sys
__builtins__.aoeu = 1
......
# expected: reffail
from future_builtins import hex, oct, map, zip, filter
from itertools import imap, izip, ifilter
......
# expected: reffail
import bz2
print bz2.decompress(bz2.compress("hello world"))
# expected: reffail
import cPickle
l = [[], (123,)]
......
# expected: reffail
# Make sure that callattrs handle exceptions (including
# different exception styles) correctly.
class C(object):
......
# expected: reffail
import slots_test
for i in xrange(3):
......
# expected: reffail
class C(object):
pass
......
# expected: reffail
class C(object):
pass
......
# expected: reffail
import gc
l = []
......
# expected: reffail
# Tests to make sure that setting __class__ changes the class, and that it's ok to disallow
# having anything other than a type as the class
class C(object):
......
# expected: reffail
from testing_helpers import test_gc
unordered_finalize = {}
......
# 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
# closure tests
# simple closure:
......
# expected: reffail
# coding: cp1252
s = u""
print ord(s), s
# expected: reffail
import os.path
s = open(os.path.join(os.path.dirname(__file__), "coding_cp1252.py"), 'r').read()
......
# expected: reffail
# -*- coding: koi8-r -*-
def test(s):
print s, "len:", len(s)
......
# expected: reffail
import collections
o = collections.OrderedDict()
......
# expected: reffail
def f(a, b):
print repr(a), repr(b), "<", a < b
print repr(a), repr(b), "<=", a <= b
......
# expected: reffail
print compile
c = compile("a", "test.py", "eval")
print type(c), c.co_filename, c.co_name
......
# expected: reffail
c = compile("a = 1; print a", "test.py", "exec")
print type(c), c.co_filename, c.co_name
......
# expected: reffail
from __future__ import division
# compile() inherits the future flags of the parent module
......
# expected: reffail
# co is compiled without the __future__ division import.
# So even though the import is present in the exec statements,
# the code will be evaluated without it. Each should print 0.
......
# expected: reffail
from __future__ import print_function
import _ast
......
# expected: reffail
# this tests are from cpythons test_compile.py
import unittest
from test import test_support
......
# expected: reffail
# TODO repr is wrong, so for now, only printing complex numbers whose real
# and imaginary parts are non-integers
......
# expected: reffail
class C(object):
def __init__(self, a):
print a
......
# expected: reffail
class C(object):
def __init__(self, x):
self.x = x
......
# expected: reffail
import copy
class C(object):
pass
......
# expected: reffail
# This segfaults under python-dbg
# (In a release build it "works" since the use-after-free happens without penalty.)
......
# expected: reffail
import csv
import StringIO
......
# expected: reffail
# We can only import ctypes for now - it would be nice to have tests later,
# which will probably involve running the existing test suite for ctype rather
# than add our own here (unless there's special Pyston-related edge cases).
......
# expected: reffail
from ctypes import *
s = "tmp"
ap = create_string_buffer(s)
......
# expected: reffail
from ctypes import *
libc = CDLL("libc.so.6")
qsort = libc.qsort
......
# expected: reffail
import curses, sys
try:
......
# expected: reffail
import sys
import subprocess
......
# expected: reffail
import os
import sys
import subprocess
......
# expected: reffail
# Simple datetime test
# Doesn't test much of the functionality, but even importing the module is tough:
......
# expected: reffail
from decimal import Decimal
for d in (Decimal("0.5"), Decimal("0"), Decimal(0), Decimal(1.0)):
......
# expected: reffail
def wrapper(f):
return f
......
# expected: reffail
d = {}
print d.get(1)
print d.setdefault(2)
......
# expected: reffail
def func(a, b=1):
print a, b
......
# expected: reffail
# Test for various defaults arguments in builtin functions:
class ExpectationFailedException(Exception):
......
# expected: reffail
try:
import __pyston__
__pyston__.setOption("LAZY_SCOPING_ANALYSIS", 0)
......
# expected: reffail
def f4():
a = 1
b = 2
......
# expected: reffail
import sys
def p():
......
# expected: reffail
x = 1
def f():
if 0:
......
# expected: reffail
#delete attribute of built-in types
def del_builtin_attr(o):
try:
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: statfail
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 == noninit_count('num_deopt')
# this used to hit an abort in our LLVM tier codegen
......
# expected: reffail
# Test some internals: when we execute some special functions, we often need to
# make sure to keep a reference to that function, in case that function ends up
# unsetting itself.
......
# expected: reffail
# TODO This is a hodgepodge of stuff, should probably organize it better
# maybe merge some of it into dunder_descriptors?
......
# expected: reffail
# run_args: -n
# statcheck: noninit_count('slowpath_getattr') <= 10
# statcheck: noninit_count('slowpath_setattr') <= 10
......
# expected: fail
# expected: reffail
# See what happens when we make __get__ and __set__ things other than functions...
# TODO add some with __del__
......
# expected: reffail
d = {2:2}
d[1] = 1
print d
......
# expected: reffail
try:
object().__dict__ = 1
except AttributeError as e:
......
# expected: reffail
class MyDict(dict):
pass
......
# expected: reffail
def dict2str(d):
result = ''
for k, v in sorted(d.items()):
......
# expected: reffail
import sys
......
# expected: reffail
from distutils.core import setup
import distutils.command.build as build
# expected: reffail
# requires:
# - code.co_firstlineno
# - sys.dysplayhook
......
# expected: reffail
# test is based on the cpython ElementTree doc
def test(ET):
xml_str = """<?xml version="1.0"?>
......
# expected: reffail
import codecs
### Codec APIs
......
# expected: reffail
try:
eval("\n 2")
print "bad, should have thrown an exception"
......
# expected: reffail
print eval("3 + 4")
a = 5
......
# expected: reffail
def f(x):
print x
......
# expected: reffail
# should_error
class BadException(Exception):
def __str__(self):
......
# expected: reffail
class TestException(Exception):
pass
......
# expected: reffail
exec """print 'hi'
a = 5
print a"""
......
# expected: reffail
import sys
import os
import subprocess
......
# expected: reffail
print 1 / 2
exec """
......
# expected: reffail
from __future__ import division
print 1 / 2
......
# expected: reffail
d = {}
exec "a = 5" in d
print d['a']
......
# expected: reffail
print 'Test getting'
g = {'a': 1}
......
# expected: reffail
def f():
exec "a = 5"
print a
......
# expected: reffail
s = """
def f():
a = 1
......
# expected: reffail
# fail-if: '-x' in EXTRA_JIT_ARGS
# - we don't get syntax errors through the old parser correctly
......
# expected: reffail
try:
execfile("doesnt_exist.py")
except IOError, e:
......
# expected: reffail
# no-collect-stats
import os
......
# expected: reffail
import basic_test
print type(basic_test)
......
# expected: reffail
import fcntl
for k in sorted(dir(fcntl)):
......
# expected: reffail
import sys
import tempfile
......
# expected: reffail
import gc
def open_lots_of_files():
......
# expected: reffail
import os
import tempfile
import array
......
# expected: reffail
import gc
finalized_at_least_once = False
......
# expected: reffail
# Exceptions from finalizers should get caught:
import sys
from testing_helpers import test_gc
......
# expected: reffail
from testing_helpers import test_gc
# __del__ does not get called because it doesn't fallback to getattr
......
# expected: reffail
import gc
from testing_helpers import test_gc
......
# expected: reffail
from testing_helpers import test_gc
class C(object):
......
# expected: reffail
# Similar to finally_continue.py, but this is allowable
for i in xrange(10):
......
# 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
print 123542598.12938712938192831293812983
f = 1.0
print f
......
# expected: reffail
for i in range(10):
print i
for i in xrange(1, 15, 2):
......
# expected: reffail
class C(object):
def __iter__(self):
print "orig iter"
......
# expected: reffail
# no-collect-stats
from thread import start_new_thread
......
# expected: reffail
def f():
def f1(a, b, c):
print a, b, c
......
# expected: reffail
def f():
"""very nice function"""
......
# expected: reffail
import functools
f = functools.partial(lambda *args: args, 1, 23)
......
# expected: reffail
"docstring"
from __future__ import division
......
# expected: reffail
import gc
# Dynamically create new classes and instances of those classes in such a way
......
# expected: reffail
import sys
def compact(s):
......
# expected: reffail
import sys
if __name__ == "__main__":
......
# expected: reffail
import sys
P = 1000000007
......
# expected: reffail
# Test to make sure that generators create and receive closures as appropriate.
def f(E, N, M):
......
# expected: reffail
# This test checks if generators which get started but haven't yet stopped (=not raisen a StopIteration exc, etc)
# get freed when there aren't any references to the generators left.
......
# expected: reffail
s = """
def g():
yield x
......
# expected: reffail
# Test a generator cycle involving an unfinished generator.
def f():
......
# expected: reffail
def g():
l1 = [1]
l2 = [2]
......
# expected: reffail
# This test could really benefit from defined/settable OSR limits
def f(x):
......
# expected: reffail
# Start a generator on one thread, pass it to another, and have that execute it for a while
def gen():
......
# expected: reffail
# Pass a started generator to two different threads, and make them both
# try to run it at the same time.
......
# expected: reffail
import threading
import traceback, sys
......
# expected: reffail
import sys
def generate(lst):
......
# expected: reffail
# Generators participate in the notional Python stack just like normal function calls do,
# even if we implement them using separate C stacks.
#
......
# expected: reffail
def G1(i=0):
while True:
yield i
......
# expected: reffail
# This throws an exception in the import machinery when we try to access __path__,
# but that should get caught.
......
# expected: reffail
# Test some weird getattr/hasattr guarding scenarios
......
# expected: reffail
g = 0
class C(object):
@property
......
# expected: reffail
# Regression test: make sure we guard / invalidate our getattr() rewrites:
class C(object):
......
# expected: reffail
# getitem
def f(l):
......
# expected: reffail
# I would have expected this to be valid, but cPython and pypy err out saying "name 'x' is local and global"
try:
......
# expected: reffail
import grp
print grp.getgrnam("root")
# expected: reffail
import gzip
import io
......
# expected: reffail
a = 'test'
assert hasattr(a, "__str__")
assert hasattr(a, "dupa") == False
......
# expected: reffail
import hashlib
#for m in [hashlib.md5(), hashlib.sha1(), hashlib.sha256(), hashlib.sha512()]:
......
# expected: reffail
import imp
print len(imp.find_module("os"))
e = imp.find_module("encodings")
......
# expected: reffail
try:
import non_existent_module
assert 0, "shouldn't get here"
......
# expected: reffail
import test_package.import_target
import import_target
print
......
# expected: reffail
# The six.py module exposed some issues with how we were handling imports;
# an imported name is not necessarily an attribute of the module object itself,
......
# expected: reffail
import import_target
print import_target.x
......
# expected: reffail
import traceback
import sys
def f():
......
# expected: reffail
# This is the same as incremental_tb_bjit.py but tests the baseline JIT.
try:
import __pyston__
......
# expected: reffail
def f1():
class C(object):
......
# expected: reffail
# should_error
# As the test filename says, init functions must return None.
# This file tests that; it also makes sure that it gets tested
......
# expected: reffail
import StringIO
import sys
......
# expected: reffail
import inspect
def f1(a, b=2, *args, **kw):
......
# expected: reffail
class C(object):
def foo(self):
pass
......
# expected: reffail
# while I think nothing requires that this works I actually found this in a library...
import subprocess
def f():
......
# expected: reffail
try:
print intern(123)
except TypeError:
......
# expected: reffail
class Random(object):
def __init__(self, seed):
self.cur = seed
......
# expected: reffail
# can't try large numbers yet due to lack of long
for i in xrange(1, 100):
for j in xrange(1, 100):
......
# expected: reffail
import io
filename = "io_test_.txt"
......
# expected: reffail
class M(type):
pass
......
# expected: reffail
# Regression test: make sure we GC special iterator objects correctly
import gc
......
# expected: reffail
import itertools
its = []
......
# expected: reffail
from StringIO import StringIO
import json
......
# expected: reffail
# statcheck: noninit_count('slowpath_runtimecall') <= 500
# statcheck: noninit_count('slowpath_callfunc') <= 500
# run_args: -n
......
# expected: reffail
# run_args: -n
# statcheck: noninit_count('slowpath_runtimecall') < 20
......
# expected: reffail
class C(object):
def __len__(self):
print "__len__"
......
# expected: reffail
l = range(5)
print l
print l * 5
......
# expected: reffail
# regression test: list sorting had a gc bug
import gc
......
# expected: reffail
class MyList(list):
pass
......
# expected: reffail
print [(i, j) for i in range(4) for j in range(4)]
def f():
......
# expected: reffail
def f1():
l = []
for i in xrange(5):
......
# expected: reffail
import logging
import warnings
......
# expected: reffail
l = 2L
print l
print type(l)
......
# expected: reffail
import marshal
o = [-1, 1.23456789, complex(1.2, 3.4)]
o += [True, False, None]
......
# expected: reffail
import math
print math.sqrt(2)
print math.sqrt(0)
......
# expected: reffail
# run_args: -n
# statcheck: noninit_count('slowpath_member_descriptor_get') <= 1500
......
# expected: reffail
def test(v):
print len(v), v.readonly, v.itemsize, v.tobytes(), v.tolist()
......
# expected: reffail
# This would make a good Python quiz:
sl = slice(1,2)
......
# expected: reffail
class MM(type):
def __new__(*args):
print "MM.__new__", args[:3]
......
# expected: reffail
# run_args: -n
# statcheck: noninit_count('slowpath_classmethod_get') <= 10
# statcheck: noninit_count('slowpath_staticmethod_get') <= 10
......
# expected: reffail
from types import ModuleType
class MyModule(ModuleType):
......
# expected: reffail
# Make sure we can at least support people who want to register themselves with modulefinder,
# even if we don't actually support using modulefinder to find modules.
......
# expected: reffail
import empty_module
import math
import types
......
# expected: reffail
import os
import pty
import subprocess
......
# expected: reffail
# Test a relatively-obscure corner case of multiple inheritance:
# the metaclass is normally the first base's metaclass, but type_new
# will specifically delegate to a later base's metaclass if it is more
......
# expected: reffail
# Testing the basic multiple-inheritance rules and functionality:
class C(object):
......
# expected: reffail
import multiprocessing
# from https://docs.python.org/2/library/multiprocessing.html
......
# expected: reffail
class A(object):
def foo(self):
print "foo"
......
# expected: reffail
# We could just have a file for each, but if we Do these in execs,
# we don't need separate files for each, and that makes it easier
# to just spam all the permutations.
......
# expected: reffail
# Simple test:
class MyClass(object):
__a = 1
......
# expected: reffail
import sys
import subprocess
......
# expected: reffail
# -*- coding: utf-8 -*-
# The Computer Language Benchmarks Game
# http://shootout.alioth.debian.org/
......
# expected: reffail
print None.__class__
print type(None).__doc__, None.__doc__
......
# expected: reffail
# Objects are allowed to resurrect other objects too, I guess
from testing_helpers import test_gc
......
# expected: reffail
class MyException(Exception):
pass
......
# expected: reffail
class C(object):
def __delattr__(self, attr):
print "delattr", attr
......
# expected: reffail
# object.__new__ doesn't complain if __init__ is overridden:
class C1(object):
......
# expected: reffail
o = object()
r = o.__reduce__()
print type(r), len(r)
......
# expected: reffail
class C():
pass
......
# expected: reffail
import operator
print operator.methodcaller
......
# expected: reffail
# Simple optparse test, taken from the optparse.py docstring:
from optparse import OptionParser
......
# expected: reffail
import os.path
print type(os)
......
# expected: reffail
#
# currently broken:
......
# expected: reffail
try:
import __pyston__
__pyston__.setOption("OSR_THRESHOLD_BASELINE", 50)
......
# expected: reffail
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# Try to trick the JIT into OSR'ing into an optimized version with a speculation
......
# expected: reffail
orig_ae = AssertionError
class MyAssertionError(Exception):
......
# expected: reffail
import os
import test_package
......
# expected: reffail
# I really don't understand all the intricacies of unicode parsing, but apparently in addition to
# Python-specific coding lines, you can put a unicode byte order mark to signify that the text
# is encoded.
......
# expected: reffail
import pickle
l = [[], (123,)]
......
# expected: reffail
import time
def pidigits(length):
......
# expected: reffail
import platform
print type(platform.python_implementation())
......
# expected: reffail
def f(a):
print a
......
# expected: reffail
# This is the same as print.py, but using print as a function
# I guess print() as a function doesn't use the softspace technique.
......
# expected: reffail
# I think pypa has an issue parsing decorator expressions if they aren't simple names
# https://github.com/vinzenz/libpypa/issues/15
......
# expected: reffail
# run_args: -n
# statcheck: noninit_count('slowpath_getattr') <= 25
......
# expected: reffail
import pwd
import os
print pwd.getpwuid(os.getuid())[5] == os.environ["HOME"]
# expected: reffail
# skip-if: '-x' in EXTRA_JIT_ARGS
# - too slow
......
# expected: reffail
print 'basic test'
class C(object):
__slots__ = ['a', 'b', '__private_var']
......
# expected: reffail
# two-argument `raise' statements where second argument is itself an exception
class A(Exception): pass
class B(Exception): pass
......
# expected: reffail
import random
print type(random.random())
# expected: reffail
import operator
print reduce(operator.add, range(50))
......
# expected: reffail
# Random regression test from implementing refcounting:
def f():
......
# expected: reffail
# Not sure if these are important or not:
p = property(1, 2, 3)
......
# expected: reffail
import relative_import4_pkg
# expected: reffail
import os, sys
def delete_file(name):
......
# expected: reffail
a=1
try:
a.b
......
# expected: reffail
import resource
for k in sorted(dir(resource)):
......
# expected: reffail
print list(reversed("hello"))
print list(reversed(""))
......
# expected: reffail
import gc
import select
......
# expected: reffail
# Objects are iterable if they just implement __getitem__:
class C(object):
......
# expected: reffail
class C(object):
def __init__(self):
self.t = set([self])
......
# expected: reffail
s1 = {1}
def sorted(s):
......
# expected: reffail
class MyDescr(object):
def __set__(self, inst, val):
print type(self), type(inst), val
......
# expected: reffail
# this file is adapted from dictcomp.py
def set2str(s):
# set isn't guaranteed to keep things in sorted order (although in CPython it does AFAICT)
......
# expected: reffail
import signal
for k in sorted(dir(signal)):
......
# expected: reffail
class Indexable(object):
def __getitem__(self, idx):
print "called getitem on object", idx
......
# expected: reffail
import socket
s = socket.socket()
......
# expected: fail
import sys
old_stdout = sys.stdout
......
# expected: reffail
def show(obj):
print obj.__class__
for b in obj.__class__.__mro__:
......
# expected: reffail
import os
try:
os.unlink('example.db')
......
# expected: reffail
import sre_compile
import sre_constants
......
# expected: reffail
import ssl
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
......
# expected: reffail
# The use of c makes sure a closure gets passed through all 4 functions.
# The use of a in g makes sure that a is in f's closure.
# The a in j should refer to the a in h, thus throwing an exception since
......
# expected: reffail
class C(object):
i = 0
def next(self):
......
# expected: reffail
def test(string, encoding):
s = string.encode(encoding)
print encoding, s
......
# expected: reffail
print "-".join(["hello", "world"])
print "-".join(("hello", "world"))
......
# expected: reffail
# Testing capitalize/title methods.
def test(s):
......
# expected: reffail
import strop
print repr(strop.whitespace)
......
# expected: reffail
import struct
s = struct.pack("II", 1, 1234)
print repr(s)
......
# expected: reffail
class CustomInt(int):
pass
......
# expected: reffail
from abc import ABCMeta
class SubClassHook:
......
# expected: reffail
import subprocess
subprocess.check_call(["true"])
......
# expected: reffail
class B(object):
def __new__(cls, arg1):
print "B.__new__", arg1
......
# expected: reffail
# this test is a modfied version of a testcase inside test_descr
class C:
......
# expected: reffail
import os
import sys
......
# expected: reffail
# this is copied out of cpythons test_sys.py and adopted to use assert stmts
import sys
import thread
......
# expected: reffail
# should_error
# Different ways of nesting exceptions
......
# expected: reffail
"""
Frame Hack Recipe #1: Ruby-style string interpolation (version 1)
"""
......
# expected: reffail
import sys
def f():
var = 42
......
# expected: reffail
# PEP-302 import hook test
import sys
......
# expected: reffail
import sys_modules_replacement_target
print hasattr(sys_modules_replacement_target, "path")
# expected: reffail
# Not sure how important or necessary this behavior is, but
# CPython's behavior around sys.modules seems to be that it saves
# an internal reference to the object, so if you set sys.modules
......
# expected: reffail
import sys
import os.path
......
# expected: reffail
import os
import tempfile
......
# expected: reffail
import termios, sys
fd = sys.stdout.fileno()
try:
......
# expected: reffail
assert chr(0) == '\x00'
......
# expected: reffail
# This is a copy of cpythons test with the recursive repr test disabled
# remove this test when we can pass cpythons test
......
# expected: reffail
# This file isn't really meant to be run as a test, though it won't really
# make a difference.
......
# expected: reffail
from thread import start_new_thread
import time
......
# expected: reffail
# skip-if: '-n' in EXTRA_JIT_ARGS or '-O' in EXTRA_JIT_ARGS
# Make sure that we can fork from a threaded environment
......
# expected: reffail
from thread import start_new_thread
import time
......
# expected: reffail
# Make sure we can spawn a bunch of threads
import threading
......
# expected: reffail
from thread import start_new_thread, allocate_lock, _count
import time
......
# expected: reffail
import gc
import threading
......
# expected: reffail
import sys
import traceback
......
# expected: reffail
# A test of both the tracebacks we generate and the traceback module
#
# (We keep fixing tracebacks in one case to break them in another, so it's time for a test.)
......
# expected: reffail
import sys, traceback
def lumberjack():
......
# expected: reffail
import math
def type_trunc(type, arg):
......
# expected: reffail
# 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.
try:
......
# expected: reffail
def f():
try:
def foo(): return 0
......
# expected: reffail
def f():
try:
# Looks like this returns from the function, but it needs to go to the finally block
......
# expected: reffail
# try-finally support
import sys
......
# expected: reffail
def f():
print (1,2,3)[-1]
f()
......
# expected: reffail
d = {}
for i in xrange(1000):
d[i] = i ** 2
......
# expected: reffail
# should_error
# Int not iterable:
a, b, c = 1
# expected: reffail
# Some parsing tests:
print ((1, 2),)
print (1, 2, 3)
......
# expected: reffail
# 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
# still compile and run the function just fine.
......
# expected: reffail
import slots_test
HEAPTYPE = 1<<9
......
# expected: reffail
def f(x):
print x, not x, ~x, +x, -x
......
# expected: reffail
print repr(unicode())
print repr(unicode('hello world'))
print unicode('hello world')
......
# expected: reffail
# Test the behavior of tuple unpacking in the face of exceptions being thrown at certain points.
# - If an exception gets thrown in the "unpack to a given size" part, none of the targets get set
# - If setting a target throws an exception, then the previous targets had been set, but not the future ones
......
# expected: reffail
import urlparse
print urlparse.urlparse("http://www.dropbox.com")
# expected: reffail
import uuid
# Hack to get the test passing until we support CTypes.
......
# expected: reffail
import sys
def f():
# By the time of the f_locals call, x will only be alive because
......
# expected: reffail
import warnings
import _warnings
......
# expected: reffail
from weakref import WeakKeyDictionary, WeakValueDictionary
class S(object):
......
# expected: reffail
import weakref
import gc
......
# expected: reffail
import weakref
def doStuff():
......
# expected: reffail
# test to ensure that weakref callbacks and finalizers get called in the
# right order
......
# expected: reffail
import weakref
from testing_helpers import test_gc
......
# expected: reffail
# Make sure we can subclass from weakref.ref, since the weakref module itself does this
from weakref import ref
......
# expected: reffail
import weakref
import array
import re
......
# expected: reffail
# Make sure we can support weakrefs on extension objects.
# The _sre.SRE_Pattern type is one of the few builtin types that supports weakrefs natively.
......
# expected: reffail
class Mgr(object):
def __init__(self): print 'Mgr.__init__()'
......
# expected: reffail
class C(object):
pass
print C.__str__ is object.__str__
......
# expected: reffail
import sys, os
# this zip contains two pkgs: test1 and test2
......
# expected: reffail
import os
import zipimport
......
......@@ -207,6 +207,9 @@ def get_test_options(fn, check_stats, run_memcheck):
elif l.startswith("# no-collect-stats"):
opts.collect_stats = False
if opts.expected == "reffail":
opts.expected = "fail"
if not opts.skip:
# consider other reasons for skipping file
if SKIP_FAILING_TESTS and opts.expected == 'fail':
......
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