Commit 04edac6e authored by Stefan Behnel's avatar Stefan Behnel

Remove some dead test code.

parent e2d8df63
...@@ -2020,6 +2020,9 @@ def main(): ...@@ -2020,6 +2020,9 @@ def main():
parser.add_option("--shard_num", dest="shard_num", metavar="K", parser.add_option("--shard_num", dest="shard_num", metavar="K",
type=int, default=-1, type=int, default=-1,
help="test only this single shard") help="test only this single shard")
parser.add_option("--profile", dest="profile",
action="store_true", default=False,
help="enable profiling of the tests")
parser.add_option("-C", "--coverage", dest="coverage", parser.add_option("-C", "--coverage", dest="coverage",
action="store_true", default=False, action="store_true", default=False,
help="collect source coverage data for the Compiler") help="collect source coverage data for the Compiler")
...@@ -2191,8 +2194,8 @@ def configure_cython(options): ...@@ -2191,8 +2194,8 @@ def configure_cython(options):
global CompilationOptions, pyrex_default_options, cython_compile global CompilationOptions, pyrex_default_options, cython_compile
from Cython.Compiler.Main import \ from Cython.Compiler.Main import \
CompilationOptions, \ CompilationOptions, \
default_options as pyrex_default_options, \ default_options as pyrex_default_options
compile as cython_compile from Cython.Compiler.Options import _directive_defaults as directive_defaults
from Cython.Compiler import Errors from Cython.Compiler import Errors
Errors.LEVEL = 0 # show all warnings Errors.LEVEL = 0 # show all warnings
from Cython.Compiler import Options from Cython.Compiler import Options
...@@ -2200,6 +2203,8 @@ def configure_cython(options): ...@@ -2200,6 +2203,8 @@ def configure_cython(options):
from Cython.Compiler import DebugFlags from Cython.Compiler import DebugFlags
DebugFlags.debug_temp_code_comments = 1 DebugFlags.debug_temp_code_comments = 1
pyrex_default_options['formal_grammar'] = options.use_formal_grammar pyrex_default_options['formal_grammar'] = options.use_formal_grammar
if options.profile:
directive_defaults['profile'] = True
if options.watermark: if options.watermark:
import Cython.Compiler.Version import Cython.Compiler.Version
Cython.Compiler.Version.watermark = options.watermark Cython.Compiler.Version.watermark = options.watermark
......
...@@ -12,6 +12,7 @@ from cython cimport view ...@@ -12,6 +12,7 @@ from cython cimport view
from cython.view cimport array from cython.view cimport array
from cython.parallel cimport prange, parallel from cython.parallel cimport prange, parallel
from functools import wraps
import gc import gc
import sys import sys
...@@ -21,11 +22,8 @@ else: ...@@ -21,11 +22,8 @@ else:
import builtins import builtins
__test__ = {}
def testcase(func): def testcase(func):
__test__[func.__name__] = func.__doc__ @wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
gc.collect() gc.collect()
result = func(*args, **kwargs) result = func(*args, **kwargs)
......
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