def test_docstring_partial_context_around_error(self, testdir):
    'Test that we show some context before the actual line of a failing\n        doctest.\n        '
    testdir.makepyfile('\n            def foo():\n                """\n                text-line-1\n                text-line-2\n                text-line-3\n                text-line-4\n                text-line-5\n                text-line-6\n                text-line-7\n                text-line-8\n                text-line-9\n                text-line-10\n                text-line-11\n                >>> 1 + 1\n                3\n\n                text-line-after\n                """\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*docstring_partial_context_around_error*', '005*text-line-3', '006*text-line-4', '013*text-line-11', '014*>>> 1 + 1', 'Expected:', '    3', 'Got:', '    2'])
    result.stdout.no_fnmatch_line('*text-line-2*')
    result.stdout.no_fnmatch_line('*text-line-after*')
Test that we show some context before the actual line of a failing
doctest.
def test_docstring_partial_context_around_error(self, testdir):
    'Test that we show some context before the actual line of a failing\n        doctest.\n        '
    testdir.makepyfile('\n            def foo():\n                "\n                text-line-1\n                text-line-2\n                text-line-3\n                text-line-4\n                text-line-5\n                text-line-6\n                text-line-7\n                text-line-8\n                text-line-9\n                text-line-10\n                text-line-11\n                >>> 1 + 1\n                3\n\n                text-line-after\n                "\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*docstring_partial_context_around_error*', '005*text-line-3', '006*text-line-4', '013*text-line-11', '014*>>> 1 + 1', 'Expected:', '    3', 'Got:', '    2'])
    result.stdout.no_fnmatch_line('*text-line-2*')
    result.stdout.no_fnmatch_line('*text-line-after*')