This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / testing / _private / utils / assert_string_equal

function

numpy.testing._private.utils:assert_string_equal

source: build-install/usr/lib/python3.14/site-packages/numpy/testing/_private/utils.py :1349

Signature

def   assert_string_equal ( actual desired )

Summary

Test if two strings are equal.

Extended Summary

If the given strings are equal, assert_string_equal does nothing. If they are not equal, an AssertionError is raised, and the diff between the strings is shown.

Parameters

actual : str

The string to test for equality against the expected string.

desired : str

The expected string.

Examples

np.testing.assert_string_equal('abc', 'abc')
np.testing.assert_string_equal('abc', 'abcd')

Aliases

  • numpy.testing.assert_string_equal