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

Method test_center

numpy/_core/tests/test_strings.py:1209–1213  ·  view source on GitHub ↗
(self, buf, width, fillchar, res, dt)

Source from the content-addressed store, hash-verified

1207 ('x', 4, '\U0001044E', '\U0001044Ex\U0001044E\U0001044E'),
1208 ])
1209 def test_center(self, buf, width, fillchar, res, dt):
1210 buf = np.array(buf, dtype=dt)
1211 fillchar = np.array(fillchar, dtype=dt)
1212 res = np.array(res, dtype=dt)
1213 assert_array_equal(np.strings.center(buf, width, fillchar), res)
1214
1215 @pytest.mark.parametrize("buf,width,fillchar,res", [
1216 ('x', 2, '\U0001044E', 'x\U0001044E'),

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
centerMethod · 0.45

Tested by

no test coverage detected