### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »

# numpy.testing.assert_string_equal

`numpy.testing.``assert_string_equal`(actual, desired)

  Test if two strings are equal.

  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')
      ...
      AssertionError: Differences in strings:
      - abc+ abcd?    +

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »