MCPcopy Create free account
hub / github.com/numpy/numpy / test_simple

Method test_simple

numpy/testing/tests/test_utils.py:1220–1230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1218
1219class TestStringEqual:
1220 def test_simple(self):
1221 assert_string_equal("hello", "hello")
1222 assert_string_equal("hello\nmultiline", "hello\nmultiline")
1223
1224 with pytest.raises(AssertionError) as exc_info:
1225 assert_string_equal("foo\nbar", "hello\nbar")
1226 msg = str(exc_info.value)
1227 assert_equal(msg, "Differences in strings:\n- foo\n+ hello")
1228
1229 assert_raises(AssertionError,
1230 lambda: assert_string_equal("foo", "hello"))
1231
1232 def test_regex(self):
1233 assert_string_equal("a+*b", "a+*b")

Callers

nothing calls this directly

Calls 3

assert_string_equalFunction · 0.90
assert_equalFunction · 0.90
assert_raisesFunction · 0.90

Tested by

no test coverage detected