tests/misc/: Make few tests skippable.
This commit is contained in:
parent
12d0731b91
commit
3e321f1724
|
@ -1,7 +1,12 @@
|
|||
# tests for things that are not implemented, or have non-compliant behaviour
|
||||
|
||||
import array
|
||||
import ustruct
|
||||
try:
|
||||
import array
|
||||
import ustruct
|
||||
except ImportError:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
# when super can't find self
|
||||
try:
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
try:
|
||||
import uio as io
|
||||
except ImportError:
|
||||
import io
|
||||
import sys
|
||||
try:
|
||||
try:
|
||||
import uio as io
|
||||
except ImportError:
|
||||
import io
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
if hasattr(sys, 'print_exception'):
|
||||
print_exception = sys.print_exception
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
# This tests that printing recursive data structure doesn't lead to segfault.
|
||||
import uio as io
|
||||
try:
|
||||
import uio as io
|
||||
except ImportError:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
l = [1, 2, 3, None]
|
||||
l[-1] = l
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
# This tests that recursion with iternext doesn't lead to segfault.
|
||||
try:
|
||||
enumerate
|
||||
filter
|
||||
map
|
||||
max
|
||||
zip
|
||||
except:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
# We need to pick an N that is large enough to hit the recursion
|
||||
# limit, but not too large that we run out of heap memory.
|
||||
|
|
Loading…
Reference in New Issue