mirror of https://github.com/python/cpython.git
Delete failing test that was checking that a slot declaration with
a non-ASCII character in it should fail. Because of PEP 3131 this test is bogus anyway. Also some cosmetic cleanup.
This commit is contained in:
parent
3a2e5ce575
commit
25d0bd687f
|
@ -1,6 +1,7 @@
|
||||||
# Test enhancements related to descriptors and new-style classes
|
# Test enhancements related to descriptors and new-style classes
|
||||||
|
|
||||||
from test.test_support import verify, vereq, verbose, TestFailed, TESTFN, get_original_stdout
|
from test.test_support import verify, vereq, verbose, TestFailed, TESTFN
|
||||||
|
from test.test_support import get_original_stdout
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import warnings
|
import warnings
|
||||||
import types
|
import types
|
||||||
|
@ -1083,13 +1084,6 @@ class C(object):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise TestFailed, "['foo\\0bar'] slots not caught"
|
raise TestFailed, "['foo\\0bar'] slots not caught"
|
||||||
try:
|
|
||||||
class C(object):
|
|
||||||
__slots__ = ["foo\u1234bar"]
|
|
||||||
except TypeError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise TestFailed, "['foo\\u1234bar'] slots not caught"
|
|
||||||
try:
|
try:
|
||||||
class C(object):
|
class C(object):
|
||||||
__slots__ = ["1"]
|
__slots__ = ["1"]
|
||||||
|
@ -3955,6 +3949,8 @@ class Oops(object):
|
||||||
|
|
||||||
def wrapper_segfault():
|
def wrapper_segfault():
|
||||||
# SF 927248: deeply nested wrappers could cause stack overflow
|
# SF 927248: deeply nested wrappers could cause stack overflow
|
||||||
|
if verbose:
|
||||||
|
print("Testing wrapper segfault...")
|
||||||
f = lambda:None
|
f = lambda:None
|
||||||
for i in range(1000000):
|
for i in range(1000000):
|
||||||
f = f.__call__
|
f = f.__call__
|
||||||
|
@ -4127,7 +4123,7 @@ def __setslice__(self, start, stop, value):
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
weakref_segfault() # Must be first, somehow
|
weakref_segfault() # Must be first, somehow
|
||||||
wrapper_segfault()
|
wrapper_segfault() # NB This one is slow
|
||||||
do_this_first()
|
do_this_first()
|
||||||
class_docstrings()
|
class_docstrings()
|
||||||
lists()
|
lists()
|
||||||
|
|
Loading…
Reference in New Issue