MCPcopy Index your code
hub / github.com/numpy/numpy / test_count

Method test_count

numpy/_core/tests/test_strings.py:475–480  ·  view source on GitHub ↗
(self, a, sub, start, end, out, dt)

Source from the content-addressed store, hash-verified

473 ("Ae¢☃€ 😊" * 100, "😊", 0, None, 100),
474 ])
475 def test_count(self, a, sub, start, end, out, dt):
476 if "😊" in a and dt == "S":
477 pytest.skip("Bytes dtype does not support non-ascii input")
478 a = np.array(a, dtype=dt)
479 sub = np.array(sub, dtype=dt)
480 assert_array_equal(np.strings.count(a, sub, start, end), out)
481
482 @pytest.mark.parametrize("a,prefix,start,end,out", [
483 ("hello", "he", 0, None, True),

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
countMethod · 0.45

Tested by

no test coverage detected