MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_fmt_where_nested

Method test_fmt_where_nested

testing/test_assertion.py:1076–1079  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1074 assert util.format_explanation(expl) == res
1075
1076 def test_fmt_where_nested(self) -> None:
1077 expl = "\n".join(["assert 1", "{1 = foo", "{foo = bar", "}", "} == 2"])
1078 res = "\n".join(["assert 1 == 2", " + where 1 = foo", " + where foo = bar"])
1079 assert util.format_explanation(expl) == res
1080
1081 def test_fmt_newline(self) -> None:
1082 expl = "\n".join(['assert "foo" == "bar"', "~- foo", "~+ bar"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected