[py-svn] r12310 - py/dist/py/documentation

hpk at codespeak.net hpk at codespeak.net
Sun May 15 18:45:12 CEST 2005


Author: hpk
Date: Sun May 15 18:45:12 2005
New Revision: 12310

Modified:
   py/dist/py/documentation/conftest.py
Log:
require "doctestmodulescope: dotted.name" in order to
turn a .txt file into doctest 



Modified: py/dist/py/documentation/conftest.py
==============================================================================
--- py/dist/py/documentation/conftest.py	(original)
+++ py/dist/py/documentation/conftest.py	Sun May 15 18:45:12 2005
@@ -90,6 +90,8 @@
         s = self.fspath.read()
         scopes = self.rex.findall(s)
         mod = py.std.types.ModuleType(self.fspath.basename, s)
+        if not scopes: 
+            return 
         if s.find('>>>> ') != -1: 
             py.test.skip("doctests cannot handle >>>> prompts") 
         elif s.find('>>> ') != -1: 



More information about the pytest-commit mailing list