summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_util.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-15 15:57:45 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-15 15:57:45 (GMT)
commit1f7fffb308390d10a2c6a4ec624f18cfeef97aeb (patch)
tree65e2437904ba089004c69c77b49e5059623b83fb /Lib/lib2to3/tests/test_util.py
parent70543acfa1bce2e5f448d8d0085df595bfa9a2f9 (diff)
downloadcpython-1f7fffb308390d10a2c6a4ec624f18cfeef97aeb.zip
cpython-1f7fffb308390d10a2c6a4ec624f18cfeef97aeb.tar.gz
cpython-1f7fffb308390d10a2c6a4ec624f18cfeef97aeb.tar.bz2
#2830: add html.escape() helper and move cgi.escape() uses in the standard library to it. It defaults to quote=True and also escapes single quotes, which makes casual use safer. The cgi.escape() interface is not touched, but emits a (silent) PendingDeprecationWarning.
Diffstat (limited to 'Lib/lib2to3/tests/test_util.py')
-rw-r--r--Lib/lib2to3/tests/test_util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_util.py b/Lib/lib2to3/tests/test_util.py
index 0ab7537..d2be82c 100644
--- a/Lib/lib2to3/tests/test_util.py
+++ b/Lib/lib2to3/tests/test_util.py
@@ -568,8 +568,8 @@ class Test_touch_import(support.TestCase):
def test_from_import(self):
node = parse('bar()')
- fixer_util.touch_import("cgi", "escape", node)
- self.assertEqual(str(node), 'from cgi import escape\nbar()\n\n')
+ fixer_util.touch_import("html", "escape", node)
+ self.assertEqual(str(node), 'from html import escape\nbar()\n\n')
def test_name_import(self):
node = parse('bar()')