{ } Raw JSON

bundles / numpy 2.4.4 / numpy / testing / _private / utils / assert_string_equal

function

numpy.testing._private.utils:assert_string_equal

source: /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