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 import _collections
d = _collections.deque() d = _collections.deque()
......
# expected: reffail
def f((a,b)): def f((a,b)):
print a,b print a,b
print sorted(list(locals().iteritems())) print sorted(list(locals().iteritems()))
......
# 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
# skip-if: '-x' in EXTRA_JIT_ARGS # skip-if: '-x' in EXTRA_JIT_ARGS
# - CPython parser backend doesn't handle well the errors # - CPython parser backend doesn't handle well the errors
# should_error # should_error
......
# expected: reffail
import _ast import _ast
def ast_parse(source, filename='<unknown>', mode='exec'): 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. # 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
print `42` print `42`
print `int` print `int`
print `2+3` print `2+3`
......
# expected: reffail
# Regression test: we rely internally on CompilerType.nonzero() always returning a BOOL, # Regression test: we rely internally on CompilerType.nonzero() always returning a BOOL,
# in at least these two cases. # in at least these two cases.
......
# expected: reffail
# Test that we can pass known-bool values through OSRs and what not: # Test that we can pass known-bool values through OSRs and what not:
def f(b): def f(b):
......
# expected: reffail
s = 'Hello world' s = 'Hello world'
t = buffer(s, 6, 5) t = buffer(s, 6, 5)
print t print t
......
# expected: reffail
import re import re
import inspect import inspect
def gen(): def gen():
......
# expected: reffail
import sys import sys
__builtins__.aoeu = 1 __builtins__.aoeu = 1
......
# expected: reffail
from future_builtins import hex, oct, map, zip, filter from future_builtins import hex, oct, map, zip, filter
from itertools import imap, izip, ifilter from itertools import imap, izip, ifilter
......
# expected: reffail
import bz2 import bz2
print bz2.decompress(bz2.compress("hello world")) print bz2.decompress(bz2.compress("hello world"))
# expected: reffail
import cPickle import cPickle
l = [[], (123,)] l = [[], (123,)]
......
# expected: reffail
# Make sure that callattrs handle exceptions (including # Make sure that callattrs handle exceptions (including
# different exception styles) correctly. # different exception styles) correctly.
class C(object): class C(object):
......
# expected: reffail
import slots_test import slots_test
for i in xrange(3): for i in xrange(3):
......
# expected: reffail
class C(object): class C(object):
pass pass
......
# expected: reffail
class C(object): class C(object):
pass pass
......
# expected: reffail
import gc import gc
l = [] l = []
......
# expected: reffail
# Tests to make sure that setting __class__ changes the class, and that it's ok to disallow # 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 # having anything other than a type as the class
class C(object): class C(object):
......
# expected: reffail
from testing_helpers import test_gc from testing_helpers import test_gc
unordered_finalize = {} unordered_finalize = {}
......
# expected: reffail
# Regression test: this triggers a bug in the way we guard for boxedfunctions and their closures. # 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 # 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 # it's possible for the function to get destructed and then a new (and different) boxedfunction to
......
# expected: reffail
# closure tests # closure tests
# simple closure: # simple closure:
......
# expected: reffail
# coding: cp1252 # coding: cp1252
s = u"" s = u""
print ord(s), s print ord(s), s
# expected: reffail
import os.path import os.path
s = open(os.path.join(os.path.dirname(__file__), "coding_cp1252.py"), 'r').read() s = open(os.path.join(os.path.dirname(__file__), "coding_cp1252.py"), 'r').read()
......
# expected: reffail
# -*- coding: koi8-r -*- # -*- coding: koi8-r -*-
def test(s): def test(s):
print s, "len:", len(s) print s, "len:", len(s)
......
# expected: reffail
import collections import collections
o = collections.OrderedDict() o = collections.OrderedDict()
......
# expected: reffail
def f(a, b): def f(a, b):
print repr(a), repr(b), "<", a < b print repr(a), repr(b), "<", a < b
print repr(a), repr(b), "<=", a <= b print repr(a), repr(b), "<=", a <= b
......
# expected: reffail
print compile print compile
c = compile("a", "test.py", "eval") c = compile("a", "test.py", "eval")
print type(c), c.co_filename, c.co_name print type(c), c.co_filename, c.co_name
......
# expected: reffail
c = compile("a = 1; print a", "test.py", "exec") c = compile("a = 1; print a", "test.py", "exec")
print type(c), c.co_filename, c.co_name print type(c), c.co_filename, c.co_name
......
# expected: reffail
from __future__ import division from __future__ import division
# compile() inherits the future flags of the parent module # compile() inherits the future flags of the parent module
......
# expected: reffail
# co is compiled without the __future__ division import. # co is compiled without the __future__ division import.
# So even though the import is present in the exec statements, # So even though the import is present in the exec statements,
# the code will be evaluated without it. Each should print 0. # the code will be evaluated without it. Each should print 0.
......
# expected: reffail
from __future__ import print_function from __future__ import print_function
import _ast import _ast
......
# expected: reffail
# this tests are from cpythons test_compile.py # this tests are from cpythons test_compile.py
import unittest import unittest
from test import test_support from test import test_support
......
# expected: reffail
# TODO repr is wrong, so for now, only printing complex numbers whose real # TODO repr is wrong, so for now, only printing complex numbers whose real
# and imaginary parts are non-integers # and imaginary parts are non-integers
......
# expected: reffail
class C(object): class C(object):
def __init__(self, a): def __init__(self, a):
print a print a
......
# expected: reffail
class C(object): class C(object):
def __init__(self, x): def __init__(self, x):
self.x = x self.x = x
......
# expected: reffail
import copy import copy
class C(object): class C(object):
pass pass
......
# expected: reffail
# This segfaults under python-dbg # This segfaults under python-dbg
# (In a release build it "works" since the use-after-free happens without penalty.) # (In a release build it "works" since the use-after-free happens without penalty.)
......
# expected: reffail
import csv import csv
import StringIO import StringIO
......
# expected: reffail
# We can only import ctypes for now - it would be nice to have tests later, # 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 # 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). # than add our own here (unless there's special Pyston-related edge cases).
......
# expected: reffail
from ctypes import * from ctypes import *
s = "tmp" s = "tmp"
ap = create_string_buffer(s) ap = create_string_buffer(s)
......
# expected: reffail
from ctypes import * from ctypes import *
libc = CDLL("libc.so.6") libc = CDLL("libc.so.6")
qsort = libc.qsort qsort = libc.qsort
......
# expected: reffail
import curses, sys import curses, sys
try: try:
......
# expected: reffail
import sys import sys
import subprocess import subprocess
......
# expected: reffail
import os import os
import sys import sys
import subprocess import subprocess
......
# expected: reffail
# Simple datetime test # Simple datetime test
# Doesn't test much of the functionality, but even importing the module is tough: # Doesn't test much of the functionality, but even importing the module is tough:
......
# expected: reffail
from decimal import Decimal from decimal import Decimal
for d in (Decimal("0.5"), Decimal("0"), Decimal(0), Decimal(1.0)): for d in (Decimal("0.5"), Decimal("0"), Decimal(0), Decimal(1.0)):
......
# expected: reffail
def wrapper(f): def wrapper(f):
return f return f
......
# expected: reffail
d = {} d = {}
print d.get(1) print d.get(1)
print d.setdefault(2) print d.setdefault(2)
......
# expected: reffail
def func(a, b=1): def func(a, b=1):
print a, b print a, b
......
# expected: reffail
# Test for various defaults arguments in builtin functions: # Test for various defaults arguments in builtin functions:
class ExpectationFailedException(Exception): class ExpectationFailedException(Exception):
......
# expected: reffail
try: try:
import __pyston__ import __pyston__
__pyston__.setOption("LAZY_SCOPING_ANALYSIS", 0) __pyston__.setOption("LAZY_SCOPING_ANALYSIS", 0)
......
# expected: reffail
def f4(): def f4():
a = 1 a = 1
b = 2 b = 2
......
# expected: reffail
import sys import sys
def p(): def p():
......
# expected: reffail
x = 1 x = 1
def f(): def f():
if 0: if 0:
......
# expected: reffail
#delete attribute of built-in types #delete attribute of built-in types
def del_builtin_attr(o): def del_builtin_attr(o):
try: try:
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS # skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 <= noninit_count('num_deopt') < 50 # statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2 # statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS # skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50 # statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2 # statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: reffail
# skip-if: '-O' in EXTRA_JIT_ARGS # skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50 # statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2 # statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# expected: statfail
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS # skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 == noninit_count('num_deopt') # statcheck: 4 == noninit_count('num_deopt')
# this used to hit an abort in our LLVM tier codegen # 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 # 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 # make sure to keep a reference to that function, in case that function ends up
# unsetting itself. # unsetting itself.
......
# expected: reffail
# TODO This is a hodgepodge of stuff, should probably organize it better # TODO This is a hodgepodge of stuff, should probably organize it better
# maybe merge some of it into dunder_descriptors? # maybe merge some of it into dunder_descriptors?
......
# expected: reffail
# run_args: -n # run_args: -n
# statcheck: noninit_count('slowpath_getattr') <= 10 # statcheck: noninit_count('slowpath_getattr') <= 10
# statcheck: noninit_count('slowpath_setattr') <= 10 # statcheck: noninit_count('slowpath_setattr') <= 10
......
# expected: fail # expected: reffail
# See what happens when we make __get__ and __set__ things other than functions... # See what happens when we make __get__ and __set__ things other than functions...
# TODO add some with __del__ # TODO add some with __del__
......
# expected: reffail
d = {2:2} d = {2:2}
d[1] = 1 d[1] = 1
print d print d
......
# expected: reffail
try: try:
object().__dict__ = 1 object().__dict__ = 1
except AttributeError as e: except AttributeError as e:
......
# expected: reffail
class MyDict(dict): class MyDict(dict):
pass pass
......
# expected: reffail
def dict2str(d): def dict2str(d):
result = '' result = ''
for k, v in sorted(d.items()): for k, v in sorted(d.items()):
......
# expected: reffail
import sys import sys
......
# expected: reffail
from distutils.core import setup from distutils.core import setup
import distutils.command.build as build import distutils.command.build as build
# expected: reffail
# requires: # requires:
# - code.co_firstlineno # - code.co_firstlineno
# - sys.dysplayhook # - sys.dysplayhook
......
# expected: reffail
# test is based on the cpython ElementTree doc # test is based on the cpython ElementTree doc
def test(ET): def test(ET):
xml_str = """<?xml version="1.0"?> xml_str = """<?xml version="1.0"?>
......
# expected: reffail
import codecs import codecs
### Codec APIs ### Codec APIs
......
# expected: reffail
try: try:
eval("\n 2") eval("\n 2")
print "bad, should have thrown an exception" print "bad, should have thrown an exception"
......
# expected: reffail
print eval("3 + 4") print eval("3 + 4")
a = 5 a = 5
......
# expected: reffail
def f(x): def f(x):
print x print x
......
# expected: reffail
# should_error # should_error
class BadException(Exception): class BadException(Exception):
def __str__(self): def __str__(self):
......
# expected: reffail
class TestException(Exception): class TestException(Exception):
pass pass
......
# expected: reffail
exec """print 'hi' exec """print 'hi'
a = 5 a = 5
print a""" print a"""
......
# expected: reffail
import sys import sys
import os import os
import subprocess import subprocess
......
# expected: reffail
print 1 / 2 print 1 / 2
exec """ exec """
......
# expected: reffail
from __future__ import division from __future__ import division
print 1 / 2 print 1 / 2
......
# expected: reffail
d = {} d = {}
exec "a = 5" in d exec "a = 5" in d
print d['a'] print d['a']
......
# expected: reffail
print 'Test getting' print 'Test getting'
g = {'a': 1} g = {'a': 1}
......
# expected: reffail
def f(): def f():
exec "a = 5" exec "a = 5"
print a print a
......
# expected: reffail
s = """ s = """
def f(): def f():
a = 1 a = 1
......
# expected: reffail
# fail-if: '-x' in EXTRA_JIT_ARGS # fail-if: '-x' in EXTRA_JIT_ARGS
# - we don't get syntax errors through the old parser correctly # - we don't get syntax errors through the old parser correctly
......
# expected: reffail
try: try:
execfile("doesnt_exist.py") execfile("doesnt_exist.py")
except IOError, e: except IOError, e:
......
# expected: reffail
# no-collect-stats # no-collect-stats
import os import os
......
# expected: reffail
import basic_test import basic_test
print type(basic_test) print type(basic_test)
......
# expected: reffail
import fcntl import fcntl
for k in sorted(dir(fcntl)): for k in sorted(dir(fcntl)):
......
# expected: reffail
import sys import sys
import tempfile import tempfile
......
# expected: reffail
import gc import gc
def open_lots_of_files(): def open_lots_of_files():
......
# expected: reffail
import os import os
import tempfile import tempfile
import array import array
......
# expected: reffail
import gc import gc
finalized_at_least_once = False finalized_at_least_once = False
......
# expected: reffail
# Exceptions from finalizers should get caught: # Exceptions from finalizers should get caught:
import sys import sys
from testing_helpers import test_gc from testing_helpers import test_gc
......
# expected: reffail
from testing_helpers import test_gc from testing_helpers import test_gc
# __del__ does not get called because it doesn't fallback to getattr # __del__ does not get called because it doesn't fallback to getattr
......
# expected: reffail
import gc import gc
from testing_helpers import test_gc from testing_helpers import test_gc
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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