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

Method test_expandtabs_raises_overflow

numpy/_core/tests/test_strings.py:828–831  ·  view source on GitHub ↗
(self, dt)

Source from the content-addressed store, hash-verified

826 assert_array_equal(np.strings.expandtabs(buf, tabsize), res)
827
828 def test_expandtabs_raises_overflow(self, dt):
829 with pytest.raises(OverflowError, match="new string is too long"):
830 np.strings.expandtabs(np.array("\ta\n\tb", dtype=dt), sys.maxsize)
831 np.strings.expandtabs(np.array("\ta\n\tb", dtype=dt), 2**61)
832
833 def test_expandtabs_length_not_cause_segfault(self, dt):
834 # see gh-28829

Callers

nothing calls this directly

Calls 1

expandtabsMethod · 0.80

Tested by

no test coverage detected