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

Method test_tb_entry_str

testing/code/test_code.py:175–182  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

173 assert "assert False" in source[5]
174
175 def test_tb_entry_str(self):
176 try:
177 assert False
178 except AssertionError:
179 exci = ExceptionInfo.from_current()
180 pattern = r" File '.*test_code.py':\d+ in test_tb_entry_str\n assert False"
181 entry = str(exci.traceback[0])
182 assert re.match(pattern, entry)
183
184
185class TestReprFuncArgs:

Callers

nothing calls this directly

Calls 2

from_currentMethod · 0.80
matchMethod · 0.80

Tested by

no test coverage detected