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

Method test_partition

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

Source from the content-addressed store, hash-verified

1244 ("𐌁𐌁𐌁𐌁𐌂𐌂𐌂𐌂𐌀𐌀𐌀𐌀", "𐌂𐌂𐌂𐌂", "𐌁𐌁𐌁𐌁", "𐌂𐌂𐌂𐌂", "𐌀𐌀𐌀𐌀"),
1245 ])
1246 def test_partition(self, buf, sep, res1, res2, res3, dt):
1247 buf = np.array(buf, dtype=dt)
1248 sep = np.array(sep, dtype=dt)
1249 res1 = np.array(res1, dtype=dt)
1250 res2 = np.array(res2, dtype=dt)
1251 res3 = np.array(res3, dtype=dt)
1252 act1, act2, act3 = np.strings.partition(buf, sep)
1253 assert_array_equal(act1, res1)
1254 assert_array_equal(act2, res2)
1255 assert_array_equal(act3, res3)
1256 assert_array_equal(act1 + act2 + act3, buf)
1257
1258 @pytest.mark.parametrize("buf,sep,res1,res2,res3", [
1259 ("āāāāĀĀĀĀ", "Ă", "", "", "āāāāĀĀĀĀ"),

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
partitionMethod · 0.45

Tested by

no test coverage detected