1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #17365, #17366, #18727 -- Switched to discovery test runner.

Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.

Refs #11077, #17032, and #18670.
This commit is contained in:
Carl Meyer
2013-05-10 23:08:45 -04:00
parent c0d8932a6d
commit 9012833af8
79 changed files with 959 additions and 1019 deletions

View File

@@ -97,6 +97,12 @@ def assert_and_parse_html(self, html, user_msg, msg):
class OutputChecker(doctest.OutputChecker):
def __init__(self):
warnings.warn(
"The django.test.testcases.OutputChecker class is deprecated; "
"use the doctest module from the Python standard library instead.",
PendingDeprecationWarning)
def check_output(self, want, got, optionflags):
"""
The entry method for doctest output checking. Defers to a sequence of
@@ -151,6 +157,10 @@ class OutputChecker(doctest.OutputChecker):
class DocTestRunner(doctest.DocTestRunner):
def __init__(self, *args, **kwargs):
warnings.warn(
"The django.test.testcases.DocTestRunner class is deprecated; "
"use the doctest module from the Python standard library instead.",
PendingDeprecationWarning)
doctest.DocTestRunner.__init__(self, *args, **kwargs)
self.optionflags = doctest.ELLIPSIS