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

Method test_partition

numpy/_core/tests/test_strings.py:945–955  ·  view source on GitHub ↗
(self, buf, sep, res1, res2, res3, dt)

Source from the content-addressed store, hash-verified

943 ("mississippi", "w", "mississippi", "", ""),
944 ])
945 def test_partition(self, buf, sep, res1, res2, res3, dt):
946 buf = np.array(buf, dtype=dt)
947 sep = np.array(sep, dtype=dt)
948 res1 = np.array(res1, dtype=dt)
949 res2 = np.array(res2, dtype=dt)
950 res3 = np.array(res3, dtype=dt)
951 act1, act2, act3 = np.strings.partition(buf, sep)
952 assert_array_equal(act1, res1)
953 assert_array_equal(act2, res2)
954 assert_array_equal(act3, res3)
955 assert_array_equal(act1 + act2 + act3, buf)
956
957 @pytest.mark.parametrize("buf,sep,res1,res2,res3", [
958 ("this is the partition method", "ti", "this is the parti",

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
partitionMethod · 0.45

Tested by

no test coverage detected