From 60dce33ab1594327ecc979d8d412c60a214b5de6 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 27 Apr 2017 20:32:12 -0400 Subject: [PATCH] Removed obsolete django.test.utils.strip_quotes(). Django's test runners no longer discover doctests. --- django/test/utils.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/django/test/utils.py b/django/test/utils.py index 9ba24a3e77..6a38412f01 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -557,7 +557,6 @@ def compare_xml(want, got): if node.nodeType != Node.COMMENT_NODE: return node - want, got = strip_quotes(want, got) want = want.strip().replace('\\n', '\n') got = got.strip().replace('\\n', '\n') @@ -575,25 +574,6 @@ def compare_xml(want, got): return check_element(want_root, got_root) -def strip_quotes(want, got): - """ - Strip quotes of doctests output values: - - >>> strip_quotes("'foo'") - "foo" - >>> strip_quotes('"foo"') - "foo" - """ - def is_quoted_string(s): - s = s.strip() - return len(s) >= 2 and s[0] == s[-1] and s[0] in ('"', "'") - - if is_quoted_string(want) and is_quoted_string(got): - want = want.strip()[1:-1] - got = got.strip()[1:-1] - return want, got - - def str_prefix(s): return s % {'_': ''}