Index: django/test/simple.py
===================================================================
--- django/test/simple.py	(revision 8075)
+++ django/test/simple.py	(working copy)
@@ -1,4 +1,4 @@
-import unittest
+import sys, time, traceback, unittest
 from django.conf import settings
 from django.db.models import get_app, get_apps
 from django.test import _doctest as doctest
@@ -140,9 +140,100 @@
 
     old_name = settings.DATABASE_NAME
     create_test_db(verbosity, autoclobber=not interactive)
-    result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
+    result = SkipTestRunner(verbosity=verbosity).run(suite)
     destroy_test_db(old_name, verbosity)
     
     teardown_test_environment()
     
     return len(result.failures) + len(result.errors)
+
+class SkipTestRunner:
+    """
+    A test runner class that adds a Skipped category in the output layer.
+    
+    Modeled after unittest.TextTestRunner.
+
+    Similarly to unittest.TextTestRunner, prints summary of the results at the end.
+    (Including a count of skipped tests.)
+    """
+
+    def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1):
+        self.stream = unittest._WritelnDecorator(stream)
+        self.descriptions = descriptions
+        self.verbosity = verbosity
+        self.result = _SkipTestResult(self.stream, descriptions, verbosity)
+
+    def run(self, test):
+        "Run the given test case or test suite."
+        startTime = time.time()
+        test.run(self.result)
+        stopTime = time.time()
+        timeTaken = stopTime - startTime
+        
+        self.result.printErrors()
+        self.stream.writeln(self.result.separator2)
+        run = self.result.testsRun
+        self.stream.writeln('Ran %d test%s in %.3fs' %
+                (run, run != 1 and 's' or '', timeTaken))
+        self.stream.writeln()
+        if not self.result.wasSuccessful():
+            self.stream.write('FAILED (')
+            failed, errored, skipped = map(len, (self.result.failures, self.result.errors, self.result.skipped))
+            if failed:
+                self.stream.write('failures=%d' % failed)
+            if errored:
+                if failed: self.stream.write(', ')
+                self.stream.write('errors=%d' % errored)
+            if skipped:
+                if errored or failed: self.stream.write(', ')
+                self.stream.write('skipped=%d' % skipped)
+            self.stream.writeln(')')
+        else:
+            self.stream.writeln('OK')
+        return self.result
+
+class _SkipTestResult(unittest._TextTestResult):
+    """
+    A test result class that adds a Skipped category in the output layer.
+    
+    Modeled after unittest._TextTestResult.
+    
+    Similarly to unittest._TextTestResult, prints out the names of tests as they are
+    run and errors as they occur.
+    """
+
+    def __init__(self, stream, descriptions, verbosity):
+        unittest._TextTestResult.__init__(self, stream, descriptions, verbosity)
+        self.skipped = []
+
+    def addError(self, test, err):
+        # Determine if this is a skipped test
+        tracebacks = traceback.extract_tb(err[2])
+        if tracebacks[-1][-1].startswith('raise SkippedTest'):
+            self.skipped.append((test, self._exc_info_to_string(err, test)))
+            if self.showAll:
+                self.stream.writeln('SKIPPED')
+            elif self.dots:
+                self.stream.write('S')
+                self.stream.flush()
+        else:
+            unittest.TestResult.addError(self, test, err)
+            if self.showAll:
+                self.stream.writeln('ERROR')
+            elif self.dots:
+                self.stream.write('E')
+                self.stream.flush()
+
+    def printErrors(self):
+        if self.dots or self.showAll:
+            self.stream.writeln()
+        self.printErrorList('SKIPPED', self.skipped)
+        self.printErrorList('ERROR', self.errors)
+        self.printErrorList('FAIL', self.failures)
+
+    def printErrorList(self, flavour, errors):
+        for test, err in errors:
+            self.stream.writeln(self.separator1)
+            self.stream.writeln('%s: %s' % (flavour, self.getDescription(test)))
+            self.stream.writeln(self.separator2)
+            self.stream.writeln('%s' % err)
Index: django/test/__init__.py
===================================================================
--- django/test/__init__.py	(revision 8075)
+++ django/test/__init__.py	(working copy)
@@ -4,3 +4,11 @@
 
 from django.test.client import Client
 from django.test.testcases import TestCase
+
+class SkippedTest(Exception):
+    
+    def __init__(self, reason):
+        self.reason = reason
+        
+    def __str__(self):
+        return self.reason
Index: django/test/decorators.py
===================================================================
--- django/test/decorators.py	(revision 0)
+++ django/test/decorators.py	(revision 0)
@@ -0,0 +1,44 @@
+from django.core import urlresolvers
+from django.test import SkippedTest
+
+def views_required(required_views=[]):
+    def urls_found():
+        try:
+            for view in required_views:
+                urlresolvers.reverse(view)
+            return True
+        except urlresolvers.NoReverseMatch:
+            return False
+    reason = 'Required view%s not found: %s' % \
+            (len(required_views) > 1 and 's' or '', ', '.join(required_views))
+    return conditional_skip(urls_found, reason=reason)
+
+def modules_required(required_modules=[]):
+    def modules_found():
+        try:
+            for module in required_modules:
+                __import__(module)
+            return True
+        except ImportError:
+            return False
+    reason = 'Required module%s not found: %s' % \
+            (len(required_modules) > 1 and 's' or '', ', '.join(required_modules))
+    return conditional_skip(modules_found, reason=reason)
+
+def skip_specific_database(database_engine):
+    def database_check():
+        from django.conf import settings
+        return database_engine == settings.DATABASE_ENGINE
+    reason = 'Database engine %s not used.' % database_engine
+    return conditional_skip(database_check, reason=reason)
+
+def conditional_skip(required_condition, reason=''):
+    if required_condition():
+        return lambda x: x
+    else:
+        return skip_test(reason)
+
+def skip_test(reason=''):
+    def _skip(x):
+        raise SkippedTest(reason=reason)
+    return lambda x: _skip
\ No newline at end of file
Index: django/contrib/auth/tests/basic.py
===================================================================
--- django/contrib/auth/tests/basic.py	(revision 8075)
+++ django/contrib/auth/tests/basic.py	(working copy)
@@ -56,6 +56,7 @@
 """
 
 from django.test import TestCase
+from django.test.decorators import views_required
 from django.core import mail
 
 class PasswordResetTest(TestCase):
@@ -69,9 +70,12 @@
         response = self.client.post('/password_reset/', {'email': 'not_a_real_email@email.com'})
         self.assertContains(response, "That e-mail address doesn't have an associated user account")
         self.assertEquals(len(mail.outbox), 0)
+    test_email_not_found = views_required(required_views=['django.contrib.auth.views.password_reset'])(test_email_not_found)
     
     def test_email_found(self):
         "Email is sent if a valid email address is provided for password reset"
         response = self.client.post('/password_reset/', {'email': 'staffmember@example.com'})
         self.assertEquals(response.status_code, 302)
         self.assertEquals(len(mail.outbox), 1)
+    test_email_found = views_required(required_views=['django.contrib.auth.views.password_reset'])(test_email_found)
+
