To provide the most recent news and documentation www.pymvpa.org reflects the development 2.0 series (renamed 0.6 series) of PyMVPA. If you are interested in the documentation of the previous stable 0.4 series of PyMVPA, please visit v04.pymvpa.org.

mvpa2.testing.assert_string_equal

mvpa2.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')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
...
AssertionError: Differences in strings:
- abc+ abcd?    +

NeuroDebian

NITRC-listed