Lines Matching refs:STR
76 def in_test_quick_match_single_character(STR): argument
77 s1 = STR("A" * 1000)
78 s2 = STR("A")
83 def in_test_no_match_single_character(STR): argument
84 s1 = STR("A" * 1000)
85 s2 = STR("B")
91 def in_test_quick_match_two_characters(STR): argument
92 s1 = STR("AB" * 1000)
93 s2 = STR("AB")
98 def in_test_no_match_two_character(STR): argument
99 s1 = STR("AB" * 1000)
100 s2 = STR("BC")
105 def in_test_slow_match_two_characters(STR): argument
106 s1 = STR("AB" * 300+"C")
107 s2 = STR("BC")
113 def in_test_slow_match_100_characters(STR): argument
114 m = STR("ABC"*33)
115 d = STR("D")
116 e = STR("E")
126 def re_test_slow_match_100_characters(STR): argument
127 m = STR("ABC"*33)
128 d = STR("D")
129 e = STR("E")
141 def find_test_quick_match_single_character(STR): argument
142 s1 = STR("A" * 1000)
143 s2 = STR("A")
149 def find_test_no_match_single_character(STR): argument
150 s1 = STR("A" * 1000)
151 s2 = STR("B")
158 def find_test_quick_match_two_characters(STR): argument
159 s1 = STR("AB" * 1000)
160 s2 = STR("AB")
166 def find_test_no_match_two_character(STR): argument
167 s1 = STR("AB" * 1000)
168 s2 = STR("BC")
174 def find_test_no_match_two_character_bis(STR): argument
175 s1 = STR("AB" * 1000)
176 s2 = STR("CA")
182 def find_test_slow_match_two_characters(STR): argument
183 s1 = STR("AB" * 300+"C")
184 s2 = STR("BC")
190 def find_test_slow_match_two_characters_bis(STR): argument
191 s1 = STR("AB" * 300+"CA")
192 s2 = STR("CA")
199 def find_test_slow_match_100_characters(STR): argument
200 m = STR("ABC"*33)
201 d = STR("D")
202 e = STR("E")
211 def find_test_slow_match_100_characters_bis(STR): argument
212 m = STR("ABC"*33)
213 d = STR("D")
214 e = STR("E")
225 def rfind_test_quick_match_single_character(STR): argument
226 s1 = STR("A" * 1000)
227 s2 = STR("A")
233 def rfind_test_no_match_single_character(STR): argument
234 s1 = STR("A" * 1000)
235 s2 = STR("B")
242 def rfind_test_quick_match_two_characters(STR): argument
243 s1 = STR("AB" * 1000)
244 s2 = STR("AB")
250 def rfind_test_no_match_two_character(STR): argument
251 s1 = STR("AB" * 1000)
252 s2 = STR("BC")
258 def rfind_test_no_match_two_character_bis(STR): argument
259 s1 = STR("AB" * 1000)
260 s2 = STR("CA")
266 def rfind_test_slow_match_two_characters(STR): argument
267 s1 = STR("C" + "AB" * 300)
268 s2 = STR("CA")
274 def rfind_test_slow_match_two_characters_bis(STR): argument
275 s1 = STR("BC" + "AB" * 300)
276 s2 = STR("BC")
283 def rfind_test_slow_match_100_characters(STR): argument
284 m = STR("ABC"*33)
285 d = STR("D")
286 e = STR("E")
295 def rfind_test_slow_match_100_characters_bis(STR): argument
296 m = STR("ABC"*33)
297 d = STR("D")
298 e = STR("E")
310 def index_test_quick_match_single_character(STR): argument
311 s1 = STR("A" * 1000)
312 s2 = STR("A")
318 def index_test_quick_match_two_characters(STR): argument
319 s1 = STR("AB" * 1000)
320 s2 = STR("AB")
326 def index_test_slow_match_two_characters(STR): argument
327 s1 = STR("AB" * 300+"C")
328 s2 = STR("BC")
335 def index_test_slow_match_100_characters(STR): argument
336 m = STR("ABC"*33)
337 d = STR("D")
338 e = STR("E")
349 def rindex_test_quick_match_single_character(STR): argument
350 s1 = STR("A" * 1000)
351 s2 = STR("A")
357 def rindex_test_quick_match_two_characters(STR): argument
358 s1 = STR("AB" * 1000)
359 s2 = STR("AB")
365 def rindex_test_slow_match_two_characters(STR): argument
366 s1 = STR("C" + "AB" * 300)
367 s2 = STR("CA")
374 def rindex_test_slow_match_100_characters(STR): argument
375 m = STR("ABC"*33)
376 d = STR("D")
377 e = STR("E")
388 def partition_test_quick_match_single_character(STR): argument
389 s1 = STR("A" * 1000)
390 s2 = STR("A")
396 def partition_test_no_match_single_character(STR): argument
397 s1 = STR("A" * 1000)
398 s2 = STR("B")
405 def partition_test_quick_match_two_characters(STR): argument
406 s1 = STR("AB" * 1000)
407 s2 = STR("AB")
413 def partition_test_no_match_two_character(STR): argument
414 s1 = STR("AB" * 1000)
415 s2 = STR("BC")
421 def partition_test_slow_match_two_characters(STR): argument
422 s1 = STR("AB" * 300+"C")
423 s2 = STR("BC")
430 def partition_test_slow_match_100_characters(STR): argument
431 m = STR("ABC"*33)
432 d = STR("D")
433 e = STR("E")
444 def rpartition_test_quick_match_single_character(STR): argument
445 s1 = STR("A" * 1000)
446 s2 = STR("A")
452 def rpartition_test_no_match_single_character(STR): argument
453 s1 = STR("A" * 1000)
454 s2 = STR("B")
461 def rpartition_test_quick_match_two_characters(STR): argument
462 s1 = STR("AB" * 1000)
463 s2 = STR("AB")
469 def rpartition_test_no_match_two_character(STR): argument
470 s1 = STR("AB" * 1000)
471 s2 = STR("BC")
477 def rpartition_test_slow_match_two_characters(STR): argument
478 s1 = STR("C" + "AB" * 300)
479 s2 = STR("CA")
486 def rpartition_test_slow_match_100_characters(STR): argument
487 m = STR("ABC"*33)
488 d = STR("D")
489 e = STR("E")
500 def split_test_quick_match_single_character(STR): argument
501 s1 = STR("A" * 1000)
502 s2 = STR("A")
508 def split_test_no_match_single_character(STR): argument
509 s1 = STR("A" * 1000)
510 s2 = STR("B")
517 def split_test_quick_match_two_characters(STR): argument
518 s1 = STR("AB" * 1000)
519 s2 = STR("AB")
525 def split_test_no_match_two_character(STR): argument
526 s1 = STR("AB" * 1000)
527 s2 = STR("BC")
533 def split_test_slow_match_two_characters(STR): argument
534 s1 = STR("AB" * 300+"C")
535 s2 = STR("BC")
542 def split_test_slow_match_100_characters(STR): argument
543 m = STR("ABC"*33)
544 d = STR("D")
545 e = STR("E")
556 def rsplit_test_quick_match_single_character(STR): argument
557 s1 = STR("A" * 1000)
558 s2 = STR("A")
564 def rsplit_test_no_match_single_character(STR): argument
565 s1 = STR("A" * 1000)
566 s2 = STR("B")
573 def rsplit_test_quick_match_two_characters(STR): argument
574 s1 = STR("AB" * 1000)
575 s2 = STR("AB")
581 def rsplit_test_no_match_two_character(STR): argument
582 s1 = STR("AB" * 1000)
583 s2 = STR("BC")
589 def rsplit_test_slow_match_two_characters(STR): argument
590 s1 = STR("C" + "AB" * 300)
591 s2 = STR("CA")
598 def rsplit_test_slow_match_100_characters(STR): argument
599 m = STR("ABC"*33)
600 d = STR("D")
601 e = STR("E")
612 def repeat_single_10_times(STR): argument
613 s = STR("A")
618 def repeat_single_1000_times(STR): argument
619 s = STR("A")
624 def repeat_5_10_times(STR): argument
625 s = STR("ABCDE")
630 def repeat_5_1000_times(STR): argument
631 s = STR("ABCDE")
638 def concat_two_strings(STR): argument
639 s1 = STR("Andrew")
640 s2 = STR("Dalke")
646 def concat_many_strings(STR): argument
647 s1=STR('TIXSGYNREDCVBHJ')
648 s2=STR('PUMTLXBZVDO')
649 s3=STR('FVZNJ')
650 s4=STR('OGDXUW')
651 s5=STR('WEIMRNCOYVGHKB')
652 s6=STR('FCQTNMXPUZH')
653 s7=STR('TICZJYRLBNVUEAK')
654 s8=STR('REYB')
655 s9=STR('PWUOQ')
656 s10=STR('EQHCMKBS')
657 s11=STR('AEVDFOH')
658 s12=STR('IFHVD')
659 s13=STR('JGTCNLXWOHQ')
660 s14=STR('ITSKEPYLROZAWXF')
661 s15=STR('THEK')
662 s16=STR('GHPZFBUYCKMNJIT')
663 s17=STR('JMUZ')
664 s18=STR('WLZQMTB')
665 s19=STR('KPADCBW')
666 s20=STR('TNJHZQAGBU')
674 def get_bytes_yielding_seq(STR, arg): argument
675 if STR is BYTES and sys.version_info >= (3,):
677 return STR(arg)
681 def join_empty_single(STR): argument
682 sep = STR("A")
683 s2 = get_bytes_yielding_seq(STR, "")
690 def join_empty_5(STR): argument
691 sep = STR("ABCDE")
692 s2 = get_bytes_yielding_seq(STR, "")
699 def join_alphabet_single(STR): argument
700 sep = STR("A")
701 s2 = get_bytes_yielding_seq(STR, "ABCDEFGHIJKLMnOPQRSTUVWXYZ")
708 def join_alphabet_5(STR): argument
709 sep = STR("ABCDE")
710 s2 = get_bytes_yielding_seq(STR, "ABCDEFGHIJKLMnOPQRSTUVWXYZ")
717 def join_alphabet_list_single(STR): argument
718 sep = STR("A")
719 s2 = [STR(x) for x in "ABCDEFGHIJKLMnOPQRSTUVWXYZ"]
726 def join_alphabet_list_five(STR): argument
727 sep = STR("ABCDE")
728 s2 = [STR(x) for x in "ABCDEFGHIJKLMnOPQRSTUVWXYZ"]
735 def join_100_words_single(STR): argument
736 sep = STR("A")
737 s2 = [STR("Bob")]*100
744 def join_100_words_5(STR): argument
745 sep = STR("ABCDE")
746 s2 = [STR("Bob")]*100
754 def whitespace_split(STR): argument
755 s = STR("Here are some words. "*2)
761 def whitespace_rsplit(STR): argument
762 s = STR("Here are some words. "*2)
769 def whitespace_split_1(STR): argument
770 s = STR("Here are some words. "*2)
778 def whitespace_rsplit_1(STR): argument
779 s = STR("Here are some words. "*2)
787 def whitespace_partition(STR): argument
788 sep = STR(" ")
789 s = STR("Here are some words. "*2)
796 def whitespace_rpartition(STR): argument
797 sep = STR(" ")
798 s = STR("Here are some words. "*2)
820 def _get_human_text(STR): argument
821 if STR is UNICODE:
823 if STR is BYTES:
828 def whitespace_split_huge(STR): argument
829 s = _get_human_text(STR)
835 def whitespace_rsplit_huge(STR): argument
836 s = _get_human_text(STR)
844 def newlines_split(STR): argument
845 s = STR("this\nis\na\ntest\n")
847 nl = STR("\n")
853 def newlines_rsplit(STR): argument
854 s = STR("this\nis\na\ntest\n")
856 nl = STR("\n")
861 def newlines_splitlines(STR): argument
862 s = STR("this\nis\na\ntest\n")
889 def _get_2000_lines(STR): argument
890 if STR is UNICODE:
892 if STR is BYTES:
898 def newlines_split_2000(STR): argument
899 s = _get_2000_lines(STR)
901 nl = STR("\n")
906 def newlines_rsplit_2000(STR): argument
907 s = _get_2000_lines(STR)
909 nl = STR("\n")
914 def newlines_splitlines_2000(STR): argument
915 s = _get_2000_lines(STR)
925 def split_multichar_sep_small(STR): argument
926 s = STR("this--is--a--test--of--the--emergency--broadcast--system")
928 pat = STR("--")
934 def rsplit_multichar_sep_small(STR): argument
935 s = STR("this--is--a--test--of--the--emergency--broadcast--system")
937 pat = STR("--")
944 def split_multichar_sep_dna(STR): argument
945 s = _get_dna(STR)
947 pat = STR("ACTAT")
953 def rsplit_multichar_sep_dna(STR): argument
954 s = _get_dna(STR)
956 pat = STR("ACTAT")
969 def tab_split_no_limit(STR): argument
970 sep = STR("\t")
971 s = STR(GFF3_example)
977 def tab_split_limit(STR): argument
978 sep = STR("\t")
979 s = STR(GFF3_example)
985 def tab_rsplit_no_limit(STR): argument
986 sep = STR("\t")
987 s = STR(GFF3_example)
993 def tab_rsplit_limit(STR): argument
994 sep = STR("\t")
995 s = STR(GFF3_example)
1004 def count_newlines(STR): argument
1005 s = _get_2000_lines(STR)
1007 nl = STR("\n")
1069 def _get_dna(STR): argument
1070 if STR is UNICODE:
1072 if STR is BYTES:
1077 def count_aact(STR): argument
1078 seq = _get_dna(STR)
1080 needle = STR("AACT")
1087 def startswith_single(STR): argument
1088 s1 = STR("Andrew")
1089 s2 = STR("A")
1096 def startswith_multiple(STR): argument
1097 s1 = STR("Andrew")
1098 s2 = STR("Andrew")
1105 def startswith_multiple_not(STR): argument
1106 s1 = STR("Andrew")
1107 s2 = STR("Anders")
1116 def endswith_single(STR): argument
1117 s1 = STR("Andrew")
1118 s2 = STR("w")
1124 def endswith_multiple(STR): argument
1125 s1 = STR("Andrew")
1126 s2 = STR("Andrew")
1133 def endswith_multiple_not(STR): argument
1134 s1 = STR("Andrew")
1135 s2 = STR("Anders")
1143 def terminal_newline_strip_right(STR): argument
1144 s = STR("Hello!\n")
1150 def terminal_newline_rstrip(STR): argument
1151 s = STR("Hello!\n")
1157 def terminal_newline_strip_left(STR): argument
1158 s = STR("\nHello!")
1164 def terminal_newline_strip_both(STR): argument
1165 s = STR("\nHello!\n")
1171 def terminal_newline_lstrip(STR): argument
1172 s = STR("\nHello!")
1179 def terminal_newline_if_else(STR): argument
1180 s = STR("Hello!\n")
1181 NL = STR("\n")
1189 def terminal_space_strip(STR): argument
1190 s = STR("Hello\t \t!")
1196 def terminal_space_rstrip(STR): argument
1197 s = STR("Hello!\t \t")
1203 def terminal_space_lstrip(STR): argument
1204 s = STR("\t \tHello!")
1213 def replace_single_character(STR): argument
1214 s = STR("This is a test!")
1215 from_str = STR(" ")
1216 to_str = STR("\t")
1224 def replace_single_character_re(STR): argument
1225 s = STR("This is a test!")
1226 pat = re.compile(STR(" "))
1227 to_str = STR("\t")
1234 def replace_single_character_big(STR): argument
1235 s = _get_2000_lines(STR)
1236 from_str = STR("\n")
1237 to_str = STR(" ")
1245 def replace_single_character_big_re(STR): argument
1246 s = _get_2000_lines(STR)
1247 pat = re.compile(STR("\n"))
1248 to_str = STR(" ")
1256 def replace_multiple_characters_dna(STR): argument
1257 seq = _get_dna(STR)
1258 from_str = STR("ATC")
1259 to_str = STR("ATT")
1267 def replace_multiple_character_big(STR): argument
1268 s = _get_2000_lines(STR)
1269 from_str = STR("\n")
1270 to_str = STR("\r\n")
1279 def replace_multiple_character_remove(STR): argument
1280 s = STR("When shall we three meet again?")
1281 from_str = STR("ee")
1282 to_str = STR("")
1291 def _get_big_s(STR): argument
1292 if STR is UNICODE: return big_s_unicode
1293 if STR is BYTES: return big_s_bytes
1300 def quick_replace_single_match(STR): argument
1301 s = _get_big_s(STR)
1302 from_str = STR("A")
1303 to_str = STR("BB")
1310 def quick_replace_multiple_match(STR): argument
1311 s = _get_big_s(STR)
1312 from_str = STR("AZZ")
1313 to_str = STR("BBZZ")
1329 def _get_format(STR): argument
1330 if STR is UNICODE:
1332 if STR is BYTES:
1338 def _get_format_dict(STR): argument
1339 if STR is UNICODE:
1341 if STR is BYTES:
1350 def format_with_dict(STR): argument
1351 s = _get_format(STR)
1352 d = _get_format_dict(STR)
1361 def lower_conversion_rare(STR): argument
1362 s = STR("Where in the world is Carmen San Deigo?"*10)
1369 def lower_conversion_dense(STR): argument
1370 s = STR("WHERE IN THE WORLD IS CARMEN SAN DEIGO?"*10)
1378 def upper_conversion_rare(STR): argument
1379 s = STR("Where in the world is Carmen San Deigo?"*10)
1386 def upper_conversion_dense(STR): argument
1387 s = STR("where in the world is carmen san deigo?"*10)