[pypy-svn] r55047 - pypy/django/tests

antocuni at codespeak.net antocuni at codespeak.net
Wed May 21 11:29:49 CEST 2008


Author: antocuni
Date: Wed May 21 11:29:48 2008
New Revision: 55047

Modified:
   pypy/django/tests/conftest.py
Log:
run only the docstring we really want to run, not every docstring in
the module!



Modified: pypy/django/tests/conftest.py
==============================================================================
--- pypy/django/tests/conftest.py	(original)
+++ pypy/django/tests/conftest.py	Wed May 21 11:29:48 2008
@@ -3,7 +3,6 @@
 import os
 import sys
 
-# XXX after invalid model tests the testing process bails out! 
 # XXX no django/contrib
 
 rootdir = py.path.local(__file__).dirpath()
@@ -46,9 +45,11 @@
         from django.test import _doctest
         checker = OutputChecker()
         runner = DocTestRunner(checker=checker)
-        finder = _doctest.DocTestFinder()
-        for test in finder.find(mod):
-            runner.run(test)
+        parser = _doctest.DocTestParser()
+        globs = mod.__dict__.copy()
+        test = parser.get_doctest(docstring, globs, "foo", "foobar", 0)
+        import pdb;pdb.set_trace()
+        runner.run(test)
         if runner.failures: 
             py.test.fail("doctest %s: %s failed out of %s" %(
                          self.fspath, runner.failures, runner.tries))



More information about the Pypy-commit mailing list