Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.testing.assert_string_equal

numpy.testing.assert_string_equal(actual,desired)[source]

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 diffbetween 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>", line1, in<module>...AssertionError:Differences in strings:- abc+ abcd?    +

Previous topic

numpy.testing.assert_warns

Next topic

numpy.testing.decorators.deprecated

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp