Changeset 6194
- Timestamp:
- 09/14/07 12:17:37 (1 year ago)
- Files:
-
- django/trunk/django/test/_doctest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/test/_doctest.py
r5391 r6194 1 1 # This is a slightly modified version of the doctest.py that shipped with Python 2.4 2 # It incorporates changes that have been submitted the the Python ticket tracker 2 # It incorporates changes that have been submitted the the Python ticket tracker 3 3 # as ticket #1521051. These changes allow for a DoctestRunner and Doctest base 4 4 # class to be specified when constructing a DoctestSuite. … … 106 106 from StringIO import StringIO 107 107 108 if sys.platform.startswith('java'): 109 # On Jython, isclass() reports some modules as classes. Patch it. 110 def patch_isclass(isclass): 111 def patched_isclass(obj): 112 return isclass(obj) and hasattr(obj, '__module__') 113 return patched_isclass 114 inspect.isclass = patch_isclass(inspect.isclass) 115 108 116 # Don't whine about the deprecated is_private function in this 109 117 # module's tests.
