Commit 8d722faf authored by Robert Bradshaw's avatar Robert Bradshaw

Fix doctests.

parent 14b9d6f0
#no doctest
print "Warning: Using prototype cython.inline code..." print "Warning: Using prototype cython.inline code..."
import tempfile import tempfile
......
...@@ -655,7 +655,10 @@ def collect_doctests(path, module_prefix, suite, selectors): ...@@ -655,7 +655,10 @@ def collect_doctests(path, module_prefix, suite, selectors):
for f in filenames: for f in filenames:
if file_matches(f): if file_matches(f):
if not f.endswith('.py'): continue 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, '.') modulename = module_prefix + filepath[len(path)+1:].replace(os.path.sep, '.')
if not [ 1 for match in selectors if match(modulename) ]: if not [ 1 for match in selectors if match(modulename) ]:
continue continue
......
...@@ -5,7 +5,7 @@ PYTHON -c "import a" ...@@ -5,7 +5,7 @@ PYTHON -c "import a"
# TODO: Better interface... # TODO: Better interface...
from Cython.Compiler.Dependencies import cythonize from Cython.Build.Dependencies import cythonize
from distutils.core import setup from distutils.core import setup
......
...@@ -5,7 +5,7 @@ PYTHON -c "import a" ...@@ -5,7 +5,7 @@ PYTHON -c "import a"
# TODO: Better interface... # TODO: Better interface...
from Cython.Compiler.Dependencies import cythonize from Cython.Build.Dependencies import cythonize
from distutils.core import setup from distutils.core import setup
......
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