Lines Matching refs:expect
798 expect = urllib.parse.quote("a\xfcb", encoding="latin-1", safe="")
799 self.assertEqual(expect, result,
801 (expect, result))
804 expect = urllib.parse.quote("a\xfcb", encoding="latin-1", safe="")
805 self.assertEqual(expect, result,
807 (expect, result))
847 expect = given.replace(' ', hexescape(' '))
849 self.assertEqual(expect, result,
850 "using quote(): %r != %r" % (expect, result))
851 expect = given.replace(' ', '+')
853 self.assertEqual(expect, result,
854 "using quote_plus(): %r != %r" % (expect, result))
871 expect = "%A2%D8ab%FF"
873 self.assertEqual(expect, result,
874 "using quote(): %r != %r" % (expect, result))
880 self.assertEqual(expect, result,
882 % (expect, result))
887 expect = "%C2%A2%C3%98ab%C3%BF"
889 self.assertEqual(expect, result,
890 "using quote(): %r != %r" % (expect, result))
893 self.assertEqual(expect, result,
894 "using quote(): %r != %r" % (expect, result))
897 expect = "%A2%D8ab%FF"
899 self.assertEqual(expect, result,
900 "using quote(): %r != %r" % (expect, result))
903 expect = "%E6%BC%A2%E5%AD%97"
905 self.assertEqual(expect, result,
906 "using quote(): %r != %r" % (expect, result))
913 expect = "%3F%3F" # "??"
916 self.assertEqual(expect, result,
917 "using quote(): %r != %r" % (expect, result))
920 expect = "%26%2328450%3B%26%2323383%3B" # "漢字"
923 self.assertEqual(expect, result,
924 "using quote(): %r != %r" % (expect, result))
929 expect = "%A2%D8+%FF"
931 self.assertEqual(expect, result,
932 "using quote_plus(): %r != %r" % (expect, result))
935 expect = "ab%3F%3F+cd"
938 self.assertEqual(expect, result,
939 "using quote_plus(): %r != %r" % (expect, result))
954 expect = chr(num)
956 self.assertEqual(expect, result,
957 "using unquote(): %r != %r" % (expect, result))
959 self.assertEqual(expect, result,
961 (expect, result))
977 expect = given
979 self.assertEqual(expect, result, "using unquote(): %r != %r"
980 % (expect, result))
982 expect = given
984 self.assertEqual(expect, result, "using unquote(): %r != %r"
985 % (expect, result))
987 expect = given
989 self.assertEqual(expect, result, "using unquote(): %r != %r"
990 % (expect, result))
993 expect = bytes(given, 'ascii')
995 self.assertEqual(expect, result, "using unquote_to_bytes(): %r != %r"
996 % (expect, result))
998 expect = bytes(given, 'ascii')
1000 self.assertEqual(expect, result, "using unquote_to_bytes(): %r != %r"
1001 % (expect, result))
1003 expect = bytes(given, 'ascii')
1005 self.assertEqual(expect, result, "using unquote_to_bytes(): %r != %r"
1006 % (expect, result))
1013 expect = b'\xab\xea'
1015 self.assertEqual(expect, result,
1017 % (expect, result))
1023 expect = "abcd"
1025 self.assertEqual(expect, result,
1026 "using quote(): %r != %r" % (expect, result))
1028 self.assertEqual(expect, result,
1029 "using unquote_plus(): %r != %r" % (expect, result))
1034 expect = given
1036 self.assertEqual(expect, result,
1037 "using unquote(): %r != %r" % (expect, result))
1038 expect = given.replace('+', ' ')
1040 self.assertEqual(expect, result,
1041 "using unquote_plus(): %r != %r" % (expect, result))
1045 expect = b'br\xc3\xbcckner_sapporo_20050930.doc'
1047 self.assertEqual(expect, result,
1049 % (expect, result))
1054 expect = b'\xe6\xbc\xa2\xc3\xbc' # UTF-8 for "\u6f22\u00fc"
1055 self.assertEqual(expect, result,
1057 % (expect, result))
1060 expect = b'\xa2\xd8ab\xff'
1062 self.assertEqual(expect, result,
1064 % (expect, result))
1068 expect = b'\xa2\xd8ab\xff'
1070 self.assertEqual(expect, result,
1072 % (expect, result))
1077 expect = 'br\u00fcckner_sapporo_20050930.doc'
1079 self.assertEqual(expect, result,
1080 "using unquote(): %r != %r" % (expect, result))
1083 self.assertEqual(expect, result,
1084 "using unquote(): %r != %r" % (expect, result))
1089 expect = 'br\u00fcckner_sapporo_20050930.doc'
1090 self.assertEqual(expect, result,
1091 "using unquote(): %r != %r" % (expect, result))
1095 expect = "\u6f22\u5b57" # "Kanji"
1097 self.assertEqual(expect, result,
1098 "using unquote(): %r != %r" % (expect, result))
1102 expect = "\ufffd" # Replacement character
1104 self.assertEqual(expect, result,
1105 "using unquote(): %r != %r" % (expect, result))
1109 self.assertEqual(expect, result,
1110 "using unquote(): %r != %r" % (expect, result))
1114 expect = ""
1116 self.assertEqual(expect, result,
1117 "using unquote(): %r != %r" % (expect, result))
1121 expect = '\u6f22\u00fc'
1122 self.assertEqual(expect, result,
1123 "using unquote(): %r != %r" % (expect, result))
1128 expect = '\u6f22\u00fc'
1129 self.assertEqual(expect, result,
1130 "using unquote(): %r != %r" % (expect, result))
1180 expect = "%s=%s" % (hexescape('&'), hexescape('='))
1182 self.assertEqual(expect, result)
1184 expect = "key+name=A+bunch+of+pluses"
1186 self.assertEqual(expect, result)
1191 expect = "sequence=%s" % urllib.parse.quote_plus(str(['1', '2', '3']))
1193 self.assertEqual(expect, result)
1196 expect = "sequence=%s" % value
1197 self.assertIn(expect, result)
1220 expect = '%3F=%3F'
1222 self.assertEqual(expect, result)
1226 expect = '%C2%A0=%C3%81'
1228 self.assertEqual(expect, result)
1232 expect = '%A0=%C1'
1234 self.assertEqual(expect, result)
1239 expect = '%3F=%3F'
1242 self.assertEqual(expect, result)
1246 expect = '%3F=1&%3F=%3F'
1249 self.assertEqual(expect, result)
1253 expect = '%C2%A0=%C3%81'
1255 self.assertEqual(expect, result)
1258 expect = '%C2%A0=42&%C2%A0=%C3%81'
1260 self.assertEqual(expect, result)
1264 expect = '%A0=%C1'
1266 self.assertEqual(expect, result)
1269 expect = '%A0=42&%A0=%C1'
1271 self.assertEqual(expect, result)
1275 expect = '%A0%24=%C1%24'
1277 self.assertEqual(expect, result)
1279 self.assertEqual(expect, result)
1283 expect = '%A0%24=42&%A0%24=%C1%24'
1285 self.assertEqual(expect, result)
1294 expect = '%A0$=%C1$'
1295 self.assertEqual(expect, result)
1299 expect = '%A0$=%C1$'
1300 self.assertEqual(expect, result)
1304 expect = '%A0$=%C1$&%A0$=13&%A0$=42'
1306 self.assertEqual(expect, result)
1313 expect = '%A0$=%C1$'
1314 self.assertEqual(expect, result)
1317 expect = '%A0$=%C1$'
1322 expect = '%A0$=%C1$&%A0$=13&%A0$=42'
1325 self.assertEqual(expect, result)
1347 expect = "needs/%s/here" % urllib.parse.quote("quot=ing")
1349 self.assertEqual(expect, result,
1351 (expect, result))
1352 expect = given
1354 self.assertEqual(expect, result,
1356 (expect, result))
1358 expect = "%s/using_quote" % urllib.parse.quote("make sure")
1360 self.assertEqual(expect, result,
1362 (expect, result))
1364 expect = os.path.join("make+sure", "using_unquote")
1366 self.assertEqual(expect, result,
1368 (expect, result))
1374 expect = 'C:\\'
1377 self.assertEqual(expect, result,
1379 (expect, result))
1381 expect = 'C:\\path'
1383 self.assertEqual(expect, result,
1385 (expect, result))