Fix doctests.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 5 Nov 2010 06:53:42 +0000 (23:53 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 5 Nov 2010 06:53:42 +0000 (23:53 -0700)
Cython/Build/Inline.py
runtests.py
tests/build/basic_cythonize.srctree
tests/build/inline_distutils.srctree

index b1ab529d6e41dd4a33cfc06d397089845c634adb..38080b8cd78dfb9914b138baf0ec8d0c328a2ca2 100644 (file)
@@ -1,3 +1,4 @@
+#no doctest
 print "Warning: Using prototype cython.inline code..."
 
 import tempfile
index 8de9b204fd98a7d2cefc783af62888bdfc475278..b8eec3ada54b749226f2e58a4939e82308909e60 100644 (file)
@@ -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
index 3e6b4029faf397f81f24e6d99a70f673d6e58120..25932a2079c545983e8c950a93980f9c6e4c0dd5 100644 (file)
@@ -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
 
index 70f2bb47f00d2de2325cc87acb2256e2a2f5561c..7ff3859b03b45d5d0115544166b19cf57ec707a1 100644 (file)
@@ -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