Index: django/test/simple.py
===================================================================
--- django/test/simple.py	(revision 7013)
+++ django/test/simple.py	(working copy)
@@ -1,3 +1,4 @@
+import os
 import unittest
 from django.conf import settings
 from django.db.models import get_app, get_apps
@@ -8,7 +9,8 @@
 
 # The module name for tests outside models.py
 TEST_MODULE = 'tests'
-    
+DOCTEST_EXTENSION = '.txt'
+
 doctestOutputChecker = OutputChecker()
 
 def get_tests(app_module):
@@ -71,13 +73,26 @@
             except ValueError:
                 # No doc tests in tests.py
                 pass
+            try:
+                # Add doctests if there are .txt in tests' module
+                doctests_dir = test_module.__path__[0]
+                doctest_files = [os.path.join(doctests_dir, doc) \
+                                    for doc in os.listdir(doctests_dir) \
+                                        if doc.endswith(DOCTEST_EXTENSION)]
+                for doctest_file in doctest_files:
+                    suite.addTest(doctest.DocFileSuite(doctest_file, 
+                                    checker=doctestOutputChecker,
+                                    runner=DocTestRunner,
+                                    module_relative=False))
+            except:
+                # TODO
+                pass
     return suite
 
 def build_test(label):
     """Construct a test case a test with the specified label. Label should 
     be of the form model.TestClass or model.TestClass.test_method. Returns
     an instantiated test or test suite corresponding to the label provided.
-        
     """
     parts = label.split('.')
     if len(parts) < 2 or len(parts) > 3:
@@ -100,6 +115,26 @@
     else: # label is app.TestClass.test_method
         return TestClass(parts[2])
 
+def build_doctest(label):
+    """Construct a test case a test with the specified label. Label should 
+    be of the form model.doctest_filename. Returns an instantiated test or 
+    test suite corresponding to the label provided.
+    """
+    import os
+    parts = label.split('.')
+    if len(parts) != 2:
+        raise ValueError("TODO")
+    app = get_app(parts[0])
+    test_filename = parts[1] + DOCTEST_EXTENSION
+    test_file = os.path.join(get_tests(app).__path__[0], test_filename)
+    try:
+        return doctest.DocFileSuite(test_file, 
+                                    checker=doctestOutputChecker,
+                                    runner=DocTestRunner,
+                                    module_relative=False)
+    except IOError:
+        raise ValueError("File '%s' does not exist" % test_file)
+
 def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
     """
     Run the unit tests for all the test labels in the provided list.
@@ -127,7 +162,10 @@
     if test_labels:
         for label in test_labels:
             if '.' in label:
-                suite.addTest(build_test(label))
+                try:
+                    suite.addTest(build_test(label))
+                except ValueError:
+                    suite.addTest(build_doctest(label))
             else:
                 app = get_app(label)
                 suite.addTest(build_suite(app))
