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

Method test_rpartition

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

Source from the content-addressed store, hash-verified

1264 ("𐌁𐌁𐌁𐌁𐌂𐌂𐌀𐌀𐌀𐌀", "𐌂𐌂", "𐌁𐌁𐌁𐌁", "𐌂𐌂", "𐌀𐌀𐌀𐌀"),
1265 ])
1266 def test_rpartition(self, buf, sep, res1, res2, res3, dt):
1267 buf = np.array(buf, dtype=dt)
1268 sep = np.array(sep, dtype=dt)
1269 res1 = np.array(res1, dtype=dt)
1270 res2 = np.array(res2, dtype=dt)
1271 res3 = np.array(res3, dtype=dt)
1272 act1, act2, act3 = np.strings.rpartition(buf, sep)
1273 assert_array_equal(act1, res1)
1274 assert_array_equal(act2, res2)
1275 assert_array_equal(act3, res3)
1276 assert_array_equal(act1 + act2 + act3, buf)
1277
1278 @pytest.mark.parametrize("method", ["strip", "lstrip", "rstrip"])
1279 @pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
rpartitionMethod · 0.80

Tested by

no test coverage detected