We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cac1e52 commit d6188dcCopy full SHA for d6188dc
mypyc/test-data/run-strings.test
@@ -815,3 +815,15 @@ def test_unicode_range() -> None:
815
assert "\u2029 \U0010AAAA\U00104444B\u205F ".strip() == "\U0010AAAA\U00104444B"
816
assert " \u3000\u205F ".strip() == ""
817
assert "\u2029 \U00102865\u205F ".rstrip() == "\u2029 \U00102865"
818
+
819
+[case testCount]
820
+def test_count() -> None:
821
+ string = "abcbcb"
822
+ assert string.count("a") == 1
823
+ assert string.count("b") == 3
824
+ assert string.count("c") == 2
825
+def test_count_start_end() -> None:
826
827
+ assert string.count("a", 0, 4) == 1
828
+ assert string.count("b", 0, 4) == 2
829
+ assert string.count("c", 0, 4) == 1
0 commit comments