From: Robert Bradshaw Date: Fri, 5 Nov 2010 06:53:42 +0000 (-0700) Subject: Fix doctests. X-Git-Tag: 0.14.alpha0~231 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d722fafad601a1224e184d91e6e2a26b4955740;p=cython.git Fix doctests. --- diff --git a/Cython/Build/Inline.py b/Cython/Build/Inline.py index b1ab529d..38080b8c 100644 --- a/Cython/Build/Inline.py +++ b/Cython/Build/Inline.py @@ -1,3 +1,4 @@ +#no doctest print "Warning: Using prototype cython.inline code..." import tempfile diff --git a/runtests.py b/runtests.py index 8de9b204..b8eec3ad 100644 --- a/runtests.py +++ b/runtests.py @@ -655,7 +655,10 @@ def collect_doctests(path, module_prefix, suite, selectors): for f in filenames: if file_matches(f): if not f.endswith('.py'): continue - filepath = os.path.join(dirpath, f)[:-len(".py")] + filepath = os.path.join(dirpath, f) + if os.path.getsize(filepath) == 0: continue + if 'no doctest' in open(filepath).next(): continue + filepath = filepath[:-len(".py")] modulename = module_prefix + filepath[len(path)+1:].replace(os.path.sep, '.') if not [ 1 for match in selectors if match(modulename) ]: continue diff --git a/tests/build/basic_cythonize.srctree b/tests/build/basic_cythonize.srctree index 3e6b4029..25932a20 100644 --- a/tests/build/basic_cythonize.srctree +++ b/tests/build/basic_cythonize.srctree @@ -5,7 +5,7 @@ PYTHON -c "import a" # TODO: Better interface... -from Cython.Compiler.Dependencies import cythonize +from Cython.Build.Dependencies import cythonize from distutils.core import setup diff --git a/tests/build/inline_distutils.srctree b/tests/build/inline_distutils.srctree index 70f2bb47..7ff3859b 100644 --- a/tests/build/inline_distutils.srctree +++ b/tests/build/inline_distutils.srctree @@ -5,7 +5,7 @@ PYTHON -c "import a" # TODO: Better interface... -from Cython.Compiler.Dependencies import cythonize +from Cython.Build.Dependencies import cythonize from distutils.core import setup