diff options
| author | Tim Graham <timograham@gmail.com> | 2017-04-27 20:32:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-27 20:32:12 -0400 |
| commit | 60dce33ab1594327ecc979d8d412c60a214b5de6 (patch) | |
| tree | 7062c9c2f6047ffc978304d7771bf75765eda373 | |
| parent | e62ea0bb9cbb54c1eef848871fe3eab2bad268dc (diff) | |
Removed obsolete django.test.utils.strip_quotes().
Django's test runners no longer discover doctests.
| -rw-r--r-- | django/test/utils.py | 20 |
1 files changed, 0 insertions, 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 % {'_': ''} |
