Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Really hidden warnings in javascript_quote tests

Refs #21725.
  • Loading branch information...
commit ac699cdc174a825e6b78c6f3c6e967bc961413c8 1 parent 5a5815d
@claudep claudep authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 tests/utils_tests/test_text.py
View
7 tests/utils_tests/test_text.py
@@ -154,11 +154,11 @@ def test_javascript_quote(self):
input = "<script>alert('Hello \\xff.\n Welcome\there\r');</script>"
output = r"<script>alert(\'Hello \\xff.\n Welcome\there\r\');<\/script>"
with warnings.catch_warnings():
+ warnings.simplefilter("ignore", PendingDeprecationWarning)
self.assertEqual(text.javascript_quote(input), output)
- # Exercising quote_double_quotes keyword argument
- input = '"Text"'
- with warnings.catch_warnings():
+ # Exercising quote_double_quotes keyword argument
+ input = '"Text"'
self.assertEqual(text.javascript_quote(input), '"Text"')
self.assertEqual(text.javascript_quote(input, quote_double_quotes=True),
'&quot;Text&quot;')
@@ -168,6 +168,7 @@ def test_javascript_quote_unicode(self):
input = "<script>alert('Hello \\xff.\n Wel𝕃come\there\r');</script>"
output = r"<script>alert(\'Hello \\xff.\n Wel𝕃come\there\r\');<\/script>"
with warnings.catch_warnings():
+ warnings.simplefilter("ignore", PendingDeprecationWarning)
self.assertEqual(text.javascript_quote(input), output)
def test_deprecation(self):

0 comments on commit ac699cd

Please sign in to comment.
Something went wrong with that request. Please try again.