Index: django/test/_doctest.py
===================================================================
--- django/test/_doctest.py     (revision 6162)
+++ django/test/_doctest.py     (working copy)
@@ -105,6 +105,16 @@
 import warnings
 from StringIO import StringIO

+# On Jython isclass() reports some modules as classes. Patch it:
+def patch_isclass(isclass):
+    def patched_isclass(obj):
+        return isclass(obj) and hasattr(obj, '__module__')
+    return patched_isclass
+if sys.platform.startswith('java'):
+    inspect.isclass = patch_isclass(inspect.isclass)
+
+
+
 # Don't whine about the deprecated is_private function in this
 # module's tests.
 warnings.filterwarnings("ignore", "is_private", DeprecationWarning,
