MCPcopy
hub / github.com/pytest-dev/pytest / test_tb_entry_str

Method test_tb_entry_str

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

Source from the content-addressed store, hash-verified

188 assert "assert False" in source[5]
189
190 def test_tb_entry_str(self):
191 try:
192 assert False
193 except AssertionError:
194 exci = ExceptionInfo.from_current()
195 pattern = r" File '.*test_code.py':\d+ in test_tb_entry_str\n assert False"
196 entry = str(exci.traceback[0])
197 assert re.match(pattern, entry)
198
199
200class TestReprFuncArgs:

Callers

nothing calls this directly

Calls 2

from_currentMethod · 0.80
matchMethod · 0.80

Tested by

no test coverage detected