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

Method test_txtfile_failing

testing/test_doctest.py:532–551  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

530 )
531
532 def test_txtfile_failing(self, pytester: Pytester):
533 p = pytester.maketxtfile(
534 """
535 >>> i = 0
536 >>> i + 1
537 2
538 """
539 )
540 result = pytester.runpytest(p, "-s")
541 result.stdout.fnmatch_lines(
542 [
543 "001 >>> i = 0",
544 "002 >>> i + 1",
545 "Expected:",
546 " 2",
547 "Got:",
548 " 1",
549 "*test_txtfile_failing.txt:2: DocTestFailure",
550 ]
551 )
552
553 def test_txtfile_with_fixtures(self, pytester: Pytester):
554 p = pytester.maketxtfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
maketxtfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected