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

Function test_issue_1944

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

Source from the content-addressed store, hash-verified

1633
1634
1635def test_issue_1944(pytester: Pytester) -> None:
1636 pytester.makepyfile(
1637 """
1638 def f():
1639 return
1640
1641 assert f() == 10
1642 """
1643 )
1644 result = pytester.runpytest()
1645 result.stdout.fnmatch_lines(["*1 error*"])
1646 assert (
1647 "AttributeError: 'Module' object has no attribute '_obj'"
1648 not in result.stdout.str()
1649 )
1650
1651
1652def test_exit_from_assertrepr_compare(monkeypatch) -> None:

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
strMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected