MCPcopy Create free account
hub / github.com/python/cpython / test_unquoting_parts

Method test_unquoting_parts

Lib/test/test_urllib.py:1068–1078  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1066 % (expect, result))
1067
1068 def test_unquoting_parts(self):
1069 # Make sure unquoting works when have non-quoted characters
1070 # interspersed
1071 given = 'ab%sd' % hexescape('c')
1072 expect = "abcd"
1073 result = urllib.parse.unquote(given)
1074 self.assertEqual(expect, result,
1075 "using quote(): %r != %r" % (expect, result))
1076 result = urllib.parse.unquote_plus(given)
1077 self.assertEqual(expect, result,
1078 "using unquote_plus(): %r != %r" % (expect, result))
1079
1080 def test_unquoting_plus(self):
1081 # Test difference between unquote() and unquote_plus()

Callers

nothing calls this directly

Calls 2

hexescapeFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected