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

Function test_sequence_comparison_uses_repr

testing/test_assertion.py:1308–1327  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1306
1307
1308def test_sequence_comparison_uses_repr(pytester: Pytester) -> None:
1309 pytester.makepyfile(
1310 """
1311 def test_hello():
1312 x = set("hello x")
1313 y = set("hello y")
1314 assert x == y
1315 """
1316 )
1317 result = pytester.runpytest()
1318 result.stdout.fnmatch_lines(
1319 [
1320 "*def test_hello():*",
1321 "*assert x == y*",
1322 "*E*Extra items*left*",
1323 "*E*'x'*",
1324 "*E*Extra items*right*",
1325 "*E*'y'*",
1326 ]
1327 )
1328
1329
1330def test_assertrepr_loaded_per_dir(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected